|
Edit an existing cron in your account.
Authentication & Action
This method needs authentication. It can be accessed by http and https.
Action type: HTTP POST.
Arguments
id (see note 1)
The id of the cron.
name (see note 1)
The name of the cron. Allowed values: string (255)
url (optional)
The url to execute the cron. Allowed values: string (255)
status (optional)
The status of the cron. Allowed values: 1 = enabled / 0 = disabled.
time_out (optional)
The time-out of the cron, in seconds. Allowed values: 30 / 180 / 600.
login (optional)
The username needed to access the resource (http authentication). Allowed value: string(255)
password (optional)
The password needed to access the resource (http authentication). Allowed value: string(32)
year (optional)
Determines in what year the cron executes. Seperate values with a comma when adding multiple values.
Allowed values: integer(4) or * (= every year). Default = *
month (optional)
Determines in what months the cron executes (1 = january, 2 = february etc...). Seperate values with a comma when adding multiple values. Allowed values: integer 1 up to 12 or * (= every month).
weekday (optional)
Determines on what days the cron executes (1 = monday, 2 = tuesday etc...). Seperate values with a comma when adding multiple values. Allowed values: integer 1 up to 7 or * (= every weekday).
day (optional)
Determines on what day of the month the cron executes. Seperate values with a comma when adding multiple values. Allowed values: integer 1 up to 31 or * (= every day).
hour (optional)
Determines on what hour the cron executes. Seperate values with a comma when adding multiple values. Allowed values: integer 0 up to 23 or * (= every hour).
minute (optional)
Determines on what minute the cron executes. Seperate values with a comma when adding multiple values. Allowed values: integer between 0 and 59 or * (= every minute).
exec_delay (optional)
Set a one-off cron to execute in 'exec_delay' minutes. This parameter can not be used together with year, month, weekday, day, hour & minute. Allowed values: integer.
NOTE 1: It is possible to use both id and name as a key. If both are present, the name is ignored as key. It may be clear that you can not change the name if you use the name as a key!
Example Request
http://api.webcron.org/cron.edit
POST data:
id=154375&name=changedCron&url=http://www.url.com/myChangedCron.php&time_out=600&weekday=4,6&hour=5&minute=20
Example Response
<rsp status="ok">
<cron id="154375" modified="2009-04-22 14:23:36" />
</rsp>
|