1. Go to this page and download the library: Download mjphaynes/php-resque library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mjphaynes / php-resque example snippets
use Resque\Blueprint\Job as JobBlueprint;
use Resque\Job;
class MyJob extends JobBlueprint
{
/**
* Runs any /**
* Actual job logic.
*
* @param array $args Arguments passed to the job
* @param Job $job Current job instance
*/
public function perform(array $args, Job $job): void
{
// Do some work
}
/**
* Runs after the job is performed.
*
* @param Job $job Current job instance
*/
public function tearDown(Job $job): void
{
}
}