Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Div
styledisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Div
iddescription
Note
titleWhere is the method executed?

The scheduled methods are executed in the client in which they are started. This means that if the client is closed, the scheduled method(s) will not run anymore. See Batch Processors for information how to continuously run methods in the background, in a client that will not be closed (automatically)



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addCronJob(jobname, cronTimings, method)
Adds a cron job to the scheduler.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addCronJob(jobname, cronTimings, method, startDate)
Adds a cron job to the scheduler.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addCronJob(jobname, cronTimings, method, startDate, endDate)
Adds a cron job to the scheduler.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addCronJob(jobname, cronTimings, method, startDate, endDate, arguments)
Adds a cron job to the scheduler.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addJob(jobname, startDate, method)
Adds a job to the scheduler.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addJob(jobname, startDate, method, repeatInterval)
Adds a job to the scheduler.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addJob(jobname, startDate, method, repeatInterval, repeatCount)
Adds a job to the scheduler.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addJob(jobName, startDate, method, repeatInterval, repeatCount, endDate)
Adds a job to the scheduler.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addJob(jobname, startDate, method, repeatInterval, repeatCount, endDate, arguments)
Adds a job to the scheduler.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
addJob(jobname, startDate, method, arguments)
Adds a job to the scheduler.
Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)
getCurrentJobNames()
Returns an array with the current jobs.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getLastRunJobName()
Returns the last job run from the scheduler.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
removeJob(jobname)
Removes a job from the scheduler.



HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idaddCronJob-String_String_Function
Table Row (tr)
idname
Table Cell (td)

addCronJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addCronJob
Span
(jobname, cronTimings, method)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a cron job to the scheduler. A cron job must have at least one minute between each execution (otherwise it won't execute).
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
{String} cronTimings
{Function} method
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// see: http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html for more info
// add a job that runs every 20 minutes after the hour (0,20,40)
plugins.scheduler.addCronJob('20mins','0 0/20 * * * ?',method)
// add a job that runs every day at 23:30 between now and 5 days from now
var dateNow = new Date();
var date5Days = new Date(dateNow.getTime()+5*24*60*60*1000);
plugins.scheduler.addCronJob('23:30','0 30 23 ? * *',method,dateNow,date5Days)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idaddCronJob-String_String_Function_Date
Table Row (tr)
idname
Table Cell (td)

addCronJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addCronJob
Span
(jobname, cronTimings, method, startDate)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a cron job to the scheduler. A cron job must have at least one minute between each execution (otherwise it won't execute).
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
{String} cronTimings
{Function} method
{Date} startDate
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// see: http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html for more info
// add a job that runs every 20 minutes after the hour (0,20,40)
plugins.scheduler.addCronJob('20mins','0 0/20 * * * ?',method)
// add a job that runs every day at 23:30 between now and 5 days from now
var dateNow = new Date();
var date5Days = new Date(dateNow.getTime()+5*24*60*60*1000);
plugins.scheduler.addCronJob('23:30','0 30 23 ? * *',method,dateNow,date5Days)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idaddCronJob-String_String_Function_Date_Date
Table Row (tr)
idname
Table Cell (td)

addCronJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addCronJob
Span
(jobname, cronTimings, method, startDate, endDate)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a cron job to the scheduler. A cron job must have at least one minute between each execution (otherwise it won't execute).
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
{String} cronTimings
{Function} method
{Date} startDate
{Date} endDate
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// see: http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html for more info
// add a job that runs every 20 minutes after the hour (0,20,40)
plugins.scheduler.addCronJob('20mins','0 0/20 * * * ?',method)
// add a job that runs every day at 23:30 between now and 5 days from now
var dateNow = new Date();
var date5Days = new Date(dateNow.getTime()+5*24*60*60*1000);
plugins.scheduler.addCronJob('23:30','0 30 23 ? * *',method,dateNow,date5Days)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idaddCronJob-String_String_Function_Date_Date_ObjectArray
Table Row (tr)
idname
Table Cell (td)

addCronJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addCronJob
Span
(jobname, cronTimings, method, startDate, endDate, arguments)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a cron job to the scheduler. A cron job must have at least one minute between each execution (otherwise it won't execute).
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
{String} cronTimings
{Function} method
{Date} startDate
{Date} endDate
{Object[]} arguments
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// see: http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html for more info
// add a job that runs every 20 minutes after the hour (0,20,40)
plugins.scheduler.addCronJob('20mins','0 0/20 * * * ?',method)
// add a job that runs every day at 23:30 between now and 5 days from now
var dateNow = new Date();
var date5Days = new Date(dateNow.getTime()+5*24*60*60*1000);
plugins.scheduler.addCronJob('23:30','0 30 23 ? * *',method,dateNow,date5Days)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idaddJob-String_Date_Function
Table Row (tr)
idname
Table Cell (td)

addJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob
Span
(jobname, startDate, method)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
{Date} startDate
{Function} method
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// add a job that runs at the given date (20 seconds in the future)
// and repeats that every 20 seconds for 40 times or the enddate is reached (0 for no repeats = just one call)
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob('in20seconds',startDate,method,20000,40,endDate)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idaddJob-String_Date_Function_Number
Table Row (tr)
idname
Table Cell (td)

addJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob
Span
(jobname, startDate, method, repeatInterval)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
{Date} startDate
{Function} method
{Number} repeatInterval - ms
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// add a job that runs at the given date (20 seconds in the future)
// and repeats that every 20 seconds for 40 times or the enddate is reached (0 for no repeats = just one call)
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob('in20seconds',startDate,method,20000,40,endDate)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idaddJob-String_Date_Function_Number_Number
Table Row (tr)
idname
Table Cell (td)

addJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob
Span
(jobname, startDate, method, repeatInterval, repeatCount)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
{Date} startDate
{Function} method
{Number} repeatInterval - ms
{Number} repeatCount
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// add a job that runs at the given date (20 seconds in the future)
// and repeats that every 20 seconds for 40 times or the enddate is reached (0 for no repeats = just one call)
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob('in20seconds',startDate,method,20000,40,endDate)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idaddJob-String_Date_Function_Number_Number_Date
Table Row (tr)
idname
Table Cell (td)

addJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob
Span
(jobName, startDate, method, repeatInterval, repeatCount, endDate)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobName
{Date} startDate
{Function} method
{Number} repeatInterval - ms
{Number} repeatCount
{Date} endDate
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// add a job that runs at the given date (20 seconds in the future)
// and repeats that every 20 seconds for 40 times or the enddate is reached (0 for no repeats = just one call)
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob('in20seconds',startDate,method,20000,40,endDate)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idaddJob-String_Date_Function_Number_Number_Date_ObjectArray
Table Row (tr)
idname
Table Cell (td)

addJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob
Span
(jobname, startDate, method, repeatInterval, repeatCount, endDate, arguments)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
{Date} startDate
{Function} method
{Number} repeatInterval - ms
{Number} repeatCount
{Date} endDate
{Object[]} arguments
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// add a job that runs at the given date (20 seconds in the future)
// and repeats that every 20 seconds for 40 times or the enddate is reached (0 for no repeats = just one call)
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob('in20seconds',startDate,method,20000,40,endDate)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idaddJob-String_Date_Function_ObjectArray
Table Row (tr)
idname
Table Cell (td)

addJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob
Span
(jobname, startDate, method, arguments)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
{Date} startDate
{Function} method
{Object[]} arguments
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// add a job that runs at the given date (20 seconds in the future)
// and repeats that every 20 seconds for 40 times or the enddate is reached (0 for no repeats = just one call)
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob('in20seconds',startDate,method,20000,40,endDate)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCurrentJobNames
Table Row (tr)
idname
Table Cell (td)

getCurrentJobNames

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String[]
Span
stylefont-weight: bold;
getCurrentJobNames
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array with the current jobs.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String[]
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
plugins.scheduler.getCurrentJobNames()
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetLastRunJobName
Table Row (tr)
idname
Table Cell (td)

getLastRunJobName

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getLastRunJobName
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the last job run from the scheduler.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
plugins.scheduler.getLastRunJobName();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idremoveJob-String
Table Row (tr)
idname
Table Cell (td)

removeJob

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
removeJob
Span
(jobname)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Removes a job from the scheduler.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} jobname
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// removes a job 'myjob' from the scheduler
plugins.scheduler.removeJob('myjob');
Table Row (tr)
classlastDetailRow
Table Cell (td)