PHP code example of pompdelux / bernard-scheduler-bundle
1. Go to this page and download the library: Download pompdelux/bernard-scheduler-bundle 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/ */
pompdelux / bernard-scheduler-bundle example snippets
use Pompdelux\BernardSchedulerBundle\Job;
// Adds 'DoStuff' job to 'some-bernard-queue' for execution in 30 seconds.
$job = new Job('some-bernard-queue', 'DoStuff', [
'any' => 'job data',
]);
$container->get('pdl.bernard_scheduler')->enqueueIn(30, $job);