Download the PHP package diversen/background-job without Composer
On this page you can find all versions of the php package diversen/background-job. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download diversen/background-job
More information about diversen/background-job
Files in diversen/background-job
Download diversen/background-job
More information about diversen/background-job
Files in diversen/background-job
Vendor diversen
Package background-job
Short Description Simple background job creator
License MIT
Homepage https://github.com/diversen/background-job
Package background-job
Short Description Simple background job creator
License MIT
Homepage https://github.com/diversen/background-job
Please rate this library. Is it a good library?
Informations about the package background-job
background-job
PHP class that executes background jobs (in a very simple way).
Used this answer found on stackoverflow.com:
http://stackoverflow.com/a/45966/464549
You will need unix platform for this to work
Install
composer require diversen/background-job
Usage
cd background-job && php example.php
example.php
:
<?php
include_once "bgJob.php"; // Only used if autoloader is not enabled
use diversen\bgJob;
$bg = new bgJob();
$command = "./example.sh";
$bg->execute($command, "output.txt", "pid.txt");
// View pid
echo $bg->pid . "\n";
This executes example.sh
:
#!/bin/bash
echo "Hi, I'm sleeping for 5 seconds..."
date
sleep 5
echo "all Done."
All versions of background-job with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.0
The package diversen/background-job contains the following files
Loading the files please wait ....