Installation with Composer
Add in composer.json
"require": {
...
"kfosoft/php-crontab-manager":"1.0"
}
Well done!
on($timeCode) : Set entire time code with one function. This has to be a complete entry. See http://en.wikipedia.org/wiki/Cron#crontab_syntax
doJob($job) : Add job to the jobs array. Each time segment should be set before calling this method. The job should include the absolute path to the commands being used.
$crontab = new /kfosoft/helpers/CronTab();
$crontab->onMinute(10)->onHour(0)->doJob('echo "job is work." >> /home/user/test')->activate();
Enjoy, guys!