troy / crontab-manager
There is no license information available for the latest version (dev-master) of this package.
a lib to control the crontab file
dev-master
2014-05-16 16:13 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-04-22 10:33:00 UTC
README
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require troy/crontab-manager "*"
or add
"troy/crontab-manager": "*"
to the require section of your composer.json
file.
usage:
1.simple example:
use troy\CrontabManager\Crontab;
$crontab = new Crontab(array(
'command'=>'command script',
.....
));
$cm = new troy\CrontabManager\CrontabFileManager('');
$cm->append($crontab);
$cm->remove($crontab);
$newCrontab = new Crontab(array(
'command'=>'command script 2'
));
$cm->update($crontab,$newCrontab);