Description
This function lists all cron jobs.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
This function does not accept parameters.
Returns
Return |
Type |
Description |
Possible values |
Example |
weekday |
string |
The day of the week on which the cron job runs. |
|
0 |
minute |
string |
The minute of the hour on which the cron job runs. |
An integer between 0 and 59.
|
0 |
hour |
string |
The hour of the day on which the cron job runs. |
An integer between 0 and 23.
|
1 |
day |
string |
The day of the month on which the cron job runs. |
An integer between 1 and 31.
|
1 |
month |
string |
The month of the year on which the cron job runs. |
An integer between 1 and 12.
|
1 |
count |
integer |
The sequence of the cron job. |
An integer. |
1 |
command |
string |
The command to run. |
A valid string. |
echo |
command_htmlsafe |
string |
An HTML-safe version of the command to run. |
A valid string. |
echo |
reason |
string |
A reason for failure. Note: This function only returns areason value if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
|