troy / crontab-manager
a lib to control the crontab file
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/troy/crontab-manager
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-10-21 12:44:51 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);