Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The JSMA job provides the following methods:

job jobs.execute(title, profile, [data], [portal], [scheduledDate])

Creates a new job and queues it for execution.

...

Code Block
languagejs
linenumberstrue
...
var scheduledDate = new Date(); //alternative libs are available for manipulating JS dates
scheduledDate.setTime(scheduledDate.getTime() + 3600 * 1000);
var portal = portals.current;
var data = JSON.stringify({ some: { arguments: ['with', 'deep', 'nesting'] } });
var job = jobs.execute(title, 'myJobProfile', data, portal, scheduledDate);
...

Parameter title:string (required)

...

The portal in which scope the job is run. Either a JSMA portal, or the uuid of a portal. Defaults to the portal of the request which called this method.

Parameter portal:scheduledDate (optional) (Since IFE 4.4.x)

A JS Date object containing the earliest execution time for the job. (It might get executed later but never earlier)

job jobs.findById(id)

Retrieve a job by ID.

...