PHP code example of goksagun / scheduler-bundle

1. Go to this page and download the library: Download goksagun/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/ */

    

goksagun / scheduler-bundle example snippets


// config/bundles.php

return [
    // ...
    Goksagun\SchedulerBundle\SchedulerBundle::class => ['all' => true],
];

use Goksagun\SchedulerBundle\Attribute\Schedule;
use Symfony\Component\Console\Command\Command;

#[Schedule(name: 'command:name argument --option', expression: '*\/10 * * * *')]
class AttributedCommand extends Command
{
    // 
}

use Goksagun\SchedulerBundle\Annotation\Schedule;
use Symfony\Component\Console\Command\Command;

/**
 * @Schedule(name="command:name argument --option", expression="*\/10 * * * *")
 */
class AnnotatedCommand extends Command
{
    // 
}