PHP code example of creadev / cron-bundle

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

    

creadev / cron-bundle example snippets


// application/ApplicationKernel.php
public function registerBundles()
{
	// ...
	$bundle = array(
		// ...
        new ColourStream\Bundle\CronBundle\ColourStreamCronBundle(),
	);
    // ...

    return $bundles;
}

/**
 * @CronJob(interval="PT1H", firstrun="09:00:00")
 */
class DemoCommand extends Command
{
    public function configure()
    {
		// Must have a name configured
		// ...
    }
    
    public function execute(InputInterface $input, OutputInterface $output)
    {
		// Your code here
    }
}