PHP code example of basecom / cronjob-bundle

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

    

basecom / cronjob-bundle example snippets

 php


namespace basecom\ExampleBundle\Command;

use basecom\CronjobBundle\Command\CronjobCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ExampleCommand extends CronjobCommand
{
	protected function configure()
	{
		parent::configure();
		$this->setName('basecom:example');
		 	 ->setDescription('Shows the easy usage of this nice CronjobBundle');
	}

	protected function executeCronjob(InputInterface $input, OutputInterface $output, $loopcount, $preloopResult = null)
	{
		$output->writeln("Hello World!");
	}
}