Cron API
Get tasks
/cron.php?info=getTasks
Params
Name | Type | Description |
---|---|---|
:info | String | getTasks |
Examples
[
{
minute: "",
hour: "",
day: "30",
month: "08",
weekDay: "10",
task: "06"
}
];
Commands
$ crontab -l
30 08 10 06 * /scripts/full-backup
Add task
/cron.php?info=addTask&minute=:minute&hour=:hour&day=:day&month=:month&weekDay=:weekDay&task=:task
Params
Name | Type | Description |
---|---|---|
:info | String | addTask |
:minute | String | |
:hour | String | |
:day | String | |
:month | String | |
:weekDay | String | |
:task | String |
Examples
{
"status":"task added"
}
Commands
$ crontab -l
$ crontab <<EOF
30 08 10 06 * /scripts/full-backup
EOF
$ crontab -l
30 08 10 06 * /scripts/full-backup
Remove task
/cron.php?info=rmTask&&remove=:remove
Params
Name | Type | Description |
---|---|---|
:info | String | rmTask |
:remove | Integer |
Examples
{
"status":"task removed"
}
Commands
$ crontab -l
30 08 10 06 * /scripts/full-backup
$ TODO
$ crontab -l