Child pages
  • scheduler

Versions Compared

Key

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

...

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)


Cache
indextrue
refresh100d
iddoc
showRefreshtrue
titleRefresh page
showDatetrue
retryEnable



servoy sReturnTypes


2100%



height: 30px;


2Supported Clients






sWordListINLINESmartClient


sWordListINLINEWebClient


sWordListINLINENGClient






servoy sSummary


12%30%58%



height: 30px;


3Methods Summary





void



Adds a cron job to the scheduler.




void



Adds a cron job to the scheduler.




void



Adds a cron job to the scheduler.




void



Adds a cron job to the scheduler.




void



Adds a job to the scheduler.




void



Adds a job to the scheduler.




void



Adds a job to the scheduler.




void



Adds a job to the scheduler.




void



Adds a job to the scheduler.




void



Adds a job to the scheduler.






Returns an array with the current jobs.






Returns the last job run from the scheduler.






Removes a job from the scheduler.





functionservoy sDetail


2100%



height:30px


2Methods Details




addCronJob


name


addCronJob(jobname, cronTimings, method)



des



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




prs


Parameters

sIndent




jobname


;





cronTimings


;





method


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addCronJob


name


addCronJob(jobname, cronTimings, method, startDate)



des



sIndent
Adds a cron job to the scheduler.
{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_prs|trigger=none}jobname cronTimings globalMethod \[startDate\] \[endDate\] \[arguments\] {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_ret|text=|trigger=button}{sub-section}{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_see|text=|trigger=button}{sub-section}{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_see|text=|trigger=button}{sub-section}{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_sam|text=|trigger=button}{sub-section}{sub-section:7CB81500-FA1C-46E9-81E5-A3C6A5F24002_sam|class=sIndent|trigger=none}{code:language=javascript} // 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 * * * ?',globalMethod) // 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 ? * *',globalMethod,dateNow,date5Days) {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=33804522-E42F-4F49-B6E7-CC73DB4E7540}{tr:id=name}{td}h6.addJob{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addJob{span}{span:id=iets|style=float: left;}\(jobname, startDate, globalMethod, repeatInterval(ms), repeatCount, endDate, arguments]]/ [arguments){span}{td}{tr}{tr:id=des}{td}{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_des|text=|trigger=button}{sub-section}{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_des|trigger=none|class=sIndent}
 A cron job must have at least one minute between each execution (otherwise it won't execute).




prs


Parameters

sIndent




jobname


;





cronTimings


;





method


;





startDate


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addCronJob


name


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



des



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




prs


Parameters

sIndent




jobname


;





cronTimings


;





method


;





startDate


;





endDate


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addCronJob


name


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



des



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




prs


Parameters

sIndent




jobname


;





cronTimings


;





method


;





startDate


;





endDate


;





arguments


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


addJob(jobname, startDate, method)



des



sIndent
Adds a job to the scheduler.




prs


Parameters

sIndent




jobname


;





startDate


;





method


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


addJob(jobname, startDate, method, repeatInterval)



des



sIndent
Adds a job to the scheduler.




prs


Parameters

sIndent




jobname


;





startDate


;





method


;





repeatInterval


ms






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


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



des



sIndent
Adds a job to the scheduler.
{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_prs|trigger=none}jobname startDate globalMethod \[repeatInterval(ms)\] \[repeatCount\] \[endDate\] \[arguments]]/ [arguments\] {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_ret|text=|trigger=button}{sub-section}{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_see|text=|trigger=button}{sub-section}{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_see|text=|trigger=button}{sub-section}{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_sam|text=|trigger=button}{sub-section}{sub-section:33804522-E42F-4F49-B6E7-CC73DB4E7540_sam|class=sIndent|trigger=none}{code:language=javascript} // 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,globalMethod,20000,40,endDate) {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7C451CDC-CD10-4005-BA12-5B3CAE754EDB}{tr:id=name}{td}h6.getCurrentJobNames{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getCurrentJobNames{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_des|text=|trigger=button}{sub-section}{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_des|trigger=none|class=sIndent}




prs


Parameters

sIndent




jobname


;





startDate


;





method


;





repeatInterval


ms





repeatCount


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


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



des



sIndent
Adds a job to the scheduler.




prs


Parameters

sIndent




jobName


;





startDate


;





method


;





repeatInterval


ms





repeatCount


;





endDate


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


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



des



sIndent
Adds a job to the scheduler.




prs


Parameters

sIndent




jobname


;





startDate


;





method


;





repeatInterval


ms





repeatCount


;





endDate


;





arguments


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






addJob


name


addJob(jobname, startDate, method, arguments)



des



sIndent
Adds a job to the scheduler.




prs


Parameters

sIndent




jobname


;





startDate


;





method


;





arguments


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






getCurrentJobNames


name


getCurrentJobNames()



des



sIndent
Returns an array with the current jobs.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_ret|text=|trigger=button}{sub-section}{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_see|text=|trigger=button}{sub-section}{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_see|text=|trigger=button}{sub-section}{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_sam|text=|trigger=button}{sub-section}{sub-section:7C451CDC-CD10-4005-BA12-5B3CAE754EDB_sam|class=sIndent|trigger=none}{code:language=javascript} // Returns an array of current jobnames plugins.scheduler.getCurrentJobNames() {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=78CC2AA2-AAE7-430B-9085-2952CBDEBE69}{tr:id=name}{td}h6.getLastRunJobName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getLastRunJobName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_des|text=|trigger=button}{sub-section}{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_ret|text=|trigger=button}{sub-section}{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_see|text=|trigger=button}{sub-section}{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_see|text=|trigger=button}{sub-section}{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_sam|text=|trigger=button}{sub-section}{sub-section:78CC2AA2-AAE7-430B-9085-2952CBDEBE69_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=766F41A8-8913-49D3-AA4D-BD2EC0900D6F}{tr:id=name}{td}h6.removeJob{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeJob{span}{span:id=iets|style=float: left;}\(jobname){span}{td}{tr}{tr:id=des}{td}{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_des|text=|trigger=button}{sub-section}{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_des|trigger=none|class=sIndent}




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.
{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_prs|trigger=none}jobname {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_ret|text=|trigger=button}{sub-section}{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_see|text=|trigger=button}{sub-section}{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_see|text=|trigger=button}{sub-section}{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_sam|text=|trigger=button}{sub-section}{sub-section:766F41A8-8913-49D3-AA4D-BD2EC0900D6F_sam|class=sIndent|trigger=none}{code:language=javascript} // removes a job 'myjob' from the scheduler plugins.scheduler.removeJob('myjob') {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}




prs


Parameters

sIndent




jobname


;






ret


Returns

sIndent




clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow