Legacy | Create Scheduled Execution

Restriction: This information no longer refers to the latest product version but may still be relevant if you are working with an older version.

Creates a new scheduled execution. It is possible to request a status message via email or SMS indicating whether the script ran successfully.

Users can create up to 20 scheduled executions.
Every scheduled execution name must be unique. You cannot use the same scheduled execution name more than once

Request syntax

Copy
https://myCloud.perfectomobile.com/services/schedules?operation=create&user=value&password=value&scheduleKey=value&recurrence=value&scriptKey=value[&optionalParameter=value]

Parameters

Name

Type

Default

Description

admin 

boolean

false

true to allow users with administrative credentials to create schedules for users in their group.

scheduleKey*

string (see format in description)


Format is: visibility:<scheduled execution_name>

visibility values: PUBLIC, PRIVATE, GROUP.

The default visibility is PRIVATE.

PRIVATE – the scheduled execution can be viewed by the owner only.

GROUP – the scheduled execution can be viewed by everyone in the owner's group.

PUBLIC – the scheduled execution can be viewed by every user.

execution_name is supplied by the user.

The scheduled execution can be updated by its owner and by automation administrators.

status 


Active

Available values: ACTIVE, INACTIVE 

owner 


user 

The user name of the user who owns the scheduled execution. This parameter is used in conjunction with the admin parameter to allow administrators to perform operations on scheduled executions of other users. If a user with administrative credentials wants to create a scheduled executions of user "User", specify the parameters as admin=true and owner=User.

recurrence*



Cron expression. 

The Cron expression maker can be used for creating Cron expressions.

Cron expression limitations

  • It is not possible for run a script every second. 
  • In the second and minute expressions " *" is not allowed.

The Cron expression is reset every round hour/day.
For example, if a schedule is executed every 20 minutes, starting 10 minutes after the top of the hour, in first hour the script will run at x:30, x:50, and in the next hour it will run at x:30, x:50 again. 

startTime 


Now 

When the scheduled execution will start. In UTC milliseconds. 

endTime 


Infinite 

When the scheduled execution will end. In UTC milliseconds. 

repeatCount 



The number of times the scheduled execution will be executed. 

scriptKey*



The repository key of the automation script file. For example, Private:executeScript.xml

param.<name>



The name and value of a run-time parameter for the script. 

securedParam.<name> 



The name and value of a secured run-time parameter for the script. 

description 



The description of the scheduled execution (free text). 

responseFormat 

string

json

Available values: json, xml

* Mandatory parameter

Response

The response contains the new scheduled execution's next run time.

Field Name

Description

nextRunTime

Specifies when the next scheduled execution will occur. The following are sub-fields of the nextRunTime.

formatted

Run time in ISO date-time format

millis

Run time in Unix/Epoch system time format