dev-master
9999999-dev
BSD
The Requires
by Lukas Povoda
v0.9.0
0.9.0.0
BSD
The Requires
by Lukas Povoda
Wallogit.com
2017 © Pedro Peláez
Simple tool which helps with maintenance of cron tasks. Croncom = cron commands., (*1)
WARNING: This is not stable release! Do not use it on production!, (*2)
It requires PHP >= 5.5, Nette Framework and Kdyby Console., (*3)
1) Add extension Sw2\Croncom\DI\CroncomExtension, for more information about configuration see the class definition., (*4)
extension:
croncom: Sw2\Croncom\DI\CroncomExtension
2) Define your tasks:, (*5)
/**
* @cron *\5 * * * *
*/
class MyCoolTask extends Sw2\Croncom\Task
{
// here i can use injects and black magic
protected function execute(InputInterface $input, OutputInterface $output)
{
// do some awesome work
}
}
3) Add it to runner:, (*6)
croncom:
tasks:
- Namespace\To\MyCoolTask
4) Set crontab on your server for * * * * * for command php www/index.php app:cron, (*7)
5) Enjoy!, (*8)
@cronThis anotation is required for automatic running. Define it as you know it from linux., (*9)
If you want to define e.g. */5 (every 5 minutes), use backslash e.g. *\5. Try it... you will know why., (*10)
Dependent on Kdyby/Console - this extension is here to provide integration of Symfony Console into Nette Framework., (*11)
Inspired by stekycz/Cronner - great idea, look at it if you want to solve cron tasks on production. His project is more mature., (*12)
Look also on mtdowling/cron-expression - it is used on annotation processing. See for more information about definition of cron task., (*13)
BSD, (*14)
BSD
BSD