cron.edit |
Edit an existing cron in your account. Authentication & ActionThis method needs authentication. It can be accessed by http and https. Action type: HTTP POST. Argumentsid (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 (2048) group_id (not required) The id of the group this cron should be added to. Id should be an integer of an existing group. group_name (not required, see note 2) The name of an existing group this cron should be added to. name should be a string with max 64 chars. 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 / 1800 / 3600. 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! NOTE 2: It is possible to use both group_id and group_name to identify the group this cron belongs to. If both are present, the group_name is ignored Example Requesthttp://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> |