Skip to main content

Schedule function

create#

The create function takes the schedule string as argument and returns scheduled object.

Syntax:

schedule().create(String scheduleInfo);

Returns: Object

Example:

s = "{\"times\":[\"02:00\"],\"yearlyDayOfWeekValues\":[],\"frequencyType\":1,\"values\":[],\"frequencyTypeEnum\":\"DAILY\",\"yearlyDayValue\":0}";scheduleObj=schedule().create(s);log scheduleObj;

nextExecutionTime#

The id function takes the scheduled Object and Start time for that Object as input and returns the nextExecution time fot that object in millis.

Syntax:

schedule().nextExecutionTime(Object scheduleCreated,Number startTime);

Returns: Number

Example:

s = "{\"times\":[\"02:00\"],\"yearlyDayOfWeekValues\":[],\"frequencyType\":1,\"values\":[],\"frequencyTypeEnum\":\"DAILY\",\"yearlyDayValue\":0}";scheduleObj=schedule().create(s);log schedule().nextExecutionTime(scheduleObj,1644898811);