cron.add |
Add a new cron to your account. Authentication & ActionThis method needs authentication. It can be accessed by http and https. Action type: HTTP POST. Argumentsname (required) The name of the cron. Allowed values: string (255) url (required) 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) 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. Default: 1 time_out (optional) The time-out of the cron, in seconds. Allowed values: 30 / 180 / 600 / 1800 / 3600. Default: 30 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). Default *. 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). Default *. 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). Default *. 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). Default *. 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: 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.add
POST data:
name=1stcron&url=http://www.url.com/mycron.php&time_out=180&login=myname& password=mypasswd&weekday=3,6&hour=5&minute=20 Example Response<rsp status="ok"> |