Child pages
  • scheduler

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
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.

...

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)

...


colgroupcolwidth80pxcoltheadid
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) Table Row (tr)td



Adds a cron job to the scheduler.




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



Adds a cron job to the scheduler.




void

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



Adds a cron job to the scheduler.




void
Table Cell (td)addJob(jobname, startDate, method) Table Cell (td)



Adds a job to the scheduler.

Table Row (tr)




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



Adds a job to the scheduler.

Table Row (tr)




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




void

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)tdremoveJob(jobname)

Boolean Table Cell (td)






Removes a job from the scheduler. HTML Table





functionclass Colcolspanservoy sDetail

Colgroup Tag


2width100%
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)

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).
tr
idtd




prs


Parameters

Divclass

sIndent

{String}




jobname


;

{String}





cronTimings

{Function}


;





method

tr


;

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


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

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)
 
Table Body (tbody)
idaddCronJob-String_String_Function_Date_Date






clients


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).
tr
idtd




prs


Parameters

Divclass

sIndent

{String}




jobname


;

{String}





cronTimings


;

{Function}





method


;

{Date}





startDate


;

{Date}





endDate

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






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




prsclass


Parameters

DivsIndent

{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}


;





startDate


;





method

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






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


addJob(jobname, startDate, method, repeatInterval)

Table Row (tr)iddiv



des Table Cell (td)

class



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)

Table Row (tr)idclass



des Table Cell (td) Div



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




prs

Table Cell (td)


Parameters

div

classsIndent

{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)id



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




tdprs


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




prsclass


Parameters

DivsIndent

{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