Child pages
  • scheduler

Versions Compared

Key

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

...

styledisplay:none

...

iddescription

...

Where 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)

...


colgroupcolwidth80pxcolthead
Cache
indextrue
refresh100d
iddoc
classshowRefreshservoy sSummarytrue
title
Refresh page
showDate
true
retry
Enable



trservoy sReturnTypes

style


2100%



height: 30px;

Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
void
Table Cell (td)addCronJob(jobname, cronTimings, method)


2Supported Clients






sWordListINLINESmartClient


sWordListINLINEWebClient


sWordListINLINENGClient






Table Row (tr)tdservoy sSummary


12%30%58%



height: 30px;


3Methods Summary





void



Adds a cron job to the scheduler.




void
Table Cell (td)addCronJob(jobname, cronTimings, method, startDate)tr



Adds a cron job to the scheduler.

Table Cell (td)




void
Table Cell (td)addCronJob(jobname, cronTimings, method, startDate, endDate) Table Row (tr)td



Adds a cron job to the scheduler.
td




void

addCronJob(jobname, cronTimings, method, startDate, endDate, arguments)
Table Row (tr)td



Adds a cron job to the scheduler.
td




void

addJob(jobname, startDate, method)
Table Row (tr)td



Adds a job to the scheduler.




void
Table Cell (td)addJob(jobname, startDate, method, repeatInterval) Table Row (tr)td



Adds a job to the scheduler.




void
Table Cell (td)addJob(jobname, startDate, method, repeatInterval, repeatCount) Table Row (tr)td



Adds a job to the scheduler.




void
Table Cell (td)addJob(jobName, startDate, method, repeatInterval, repeatCount, endDate) Table Row (tr)td



Adds a job to the scheduler.




void
Table Cell (td)addJob(jobname, startDate, method, repeatInterval, repeatCount, endDate, arguments) Table Row (tr)td



Adds a job to the scheduler.




void
Table Cell (td)addJob(jobname, startDate, method, arguments) Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)getCurrentJobNames()



Adds a job to the scheduler.
getLastRunJobName()






Returns an array with the current jobs.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)






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.
table

id





functionclass Colgroup Tag Colcolspanservoy sDetail


2
width100%
Col
Table Head (thead) Table Row (tr)style



height:30px
; Table Head (th)colspan


2
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
SpanMethods Details




addCronJob


name


addCronJob(jobname, cronTimings, method)

Table Row (tr)id



des Table Cell (td) Divclass



sIndent
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)idtd




prsclass


Parameters

DivsIndent

{String}




jobname


;

{String}





cronTimings


;

{Function}





method

tr 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


;

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)
 






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addCronJob


name


addCronJob(jobname, cronTimings, method, startDate)

Table Row (tr)idclass



des Table Cell (td) Div



sIndent
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)idtd




prs


Parameters

Divclass

sIndent

{String}




jobname


;

{String}





cronTimings


;

{Function}





method


;

{Date}





startDate

tr


;

id 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






clients

ret

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)
 


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addCronJob


name


addCronJob(jobname, cronTimings, method, startDate, endDate)

Table Row (tr)idclass



des Table Cell (td) Div



sIndent
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)idtd




prs


Parameters

Divclass

sIndent

{String}




jobname


;

{String}

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





cronTimings

{Function} method
{Date} startDate
{Date} endDate


;





method


;





startDate


;





endDate


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addCronJob


name


addCronJob(jobname, cronTimings, method, startDate, endDate, arguments)

Table Row (tr)idclass



des Table Cell (td) Div



sIndent
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)idtd




prs


Parameters

Divclass

sIndent

{String}




jobname


;

{String}





cronTimings


;

{Function}





method


;

{Date}





startDate


;

{Date}





endDate


;

{Object[]}





arguments

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






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


addJob(jobname, startDate, method)

Table Row (tr)idclass



des Table Cell (td) Div



sIndent
Adds a job to the scheduler.
Table Row (tr)idtd




prs


Parameters

Divclass

sIndent

{String}




jobname


;

{Date}





startDate


;

{Function}





method

trid


;

idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam

Table Cell (td)

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


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)
sIdent


javascript





lastDetailRow






addJob


name


addJob(jobname, startDate, method, repeatInterval)

Table Row (tr)idclass



des Table Cell (td) Div



sIndent
Adds a job to the scheduler.
Table Row (tr)idtd




prs


Parameters

Divclass

sIndent

{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






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


addJob(jobname, startDate, method, repeatInterval, repeatCount)

tr

idclass



des
Table Cell (td) Div



sIndent
Adds a job to the scheduler.
Table Row (tr)idtd




prs


Parameters

Divclass

sIndent

{String}




jobname


;

{Date}





startDate


;

{Function}





method


;

{Number}





repeatInterval
-


ms

{Number}





repeatCount

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






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


addJob(jobName, startDate, method, repeatInterval, repeatCount, endDate)

Table Row (tr)idclass



des Table Cell (td) Div



sIndent
Adds a job to the scheduler.
Table Row (tr)idtd




prs


Parameters

Divclass

sIndent

{String}




jobName


;

{Date}





startDate


;

{Function}





method


;

{Number}





repeatInterval
-


ms

{Number}





repeatCount


;

{Date}





endDate

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






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


addJob(jobname, startDate, method, repeatInterval, repeatCount, endDate, arguments)

Table Row (tr)id Divclass



des Table Cell (td)



sIndent
Adds a job to the scheduler.
Table Row (tr)idtd




prs


Parameters

Divclass

sIndent

{String}




jobname


;

{Date}





startDate


;

{Function}





method


;

{Number}





repeatInterval
-


ms

{Number}





repeatCount


;

{Date}





endDate


;

{Object[]}





arguments

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






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


addJob(jobname, startDate, method, arguments)

Table Row (tr)id Divclass



des Table Cell (td)



sIndent
Adds a job to the scheduler.
Table Row (tr)idtd




prs


Parameters

Divclass

sIndent

{String}




jobname


;

{Date}





startDate


;

{Function}





method


;

{Object[]}





arguments

tr

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) 


;

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)
 






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






getCurrentJobNames


name


getCurrentJobNames()



des



sIndent
Returns an array with the current jobs.




ret


Returns

sIndent




clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






getLastRunJobName


name


getLastRunJobName()



des



sIndent
Returns the last job run from the scheduler.




ret


Returns

sIndent




clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






removeJob


name


removeJob(jobname)



des



sIndent
Removes a job from the scheduler.




prs


Parameters

sIndent




jobname


;






ret


Returns

sIndent




clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow