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


Cache
indextrue
refresh100d
id

...

doc

...

showRefresh

...

true

...

title

...

Refresh page

...

showDate

...

true

...

retry

...

Enable

...



servoy sReturnTypes

...


2100%



height: 30px;

...

Table Head (th)
colspan2
Method Summary

...

Table Cell (td)
void

...


...

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.

...

...

Table Cell (td)
String

...






Returns an array with the current jobs.

...

...






Returns the last job run from the scheduler.

...

...






Removes a job from the scheduler.

...





...

function

...

servoy sDetail

...

padding0px
width100%

...


2100%



height:30px

...

Table Head (th)
colspan1
Method Details

...

idaddCronJob-String_String_Function
Table Row (tr)
idname
Table Cell (td)
addCronJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addCronJob

...


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

...


;

...

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)

...

classlastDetailRow

...

idaddCronJob-String_String_Function_Date
Table Row (tr)
idname
Table Cell (td)
addCronJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addCronJob

...






...

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. A cron job must have at least one minute between each execution (otherwise it won't execute).

...




...

prs

...


Parameters

...

sIndent

...




jobname


;

...





cronTimings


;

...





method


;

...





startDate

...


;

...

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)

...

classlastDetailRow

...

idaddCronJob-String_String_Function_Date_Date
Table Row (tr)
idname
Table Cell (td)
addCronJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addCronJob

...






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

...


;

...

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)

...

classlastDetailRow

...

idaddCronJob-String_String_Function_Date_Date_ObjectArray
Table Row (tr)
idname
Table Cell (td)
addCronJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addCronJob

...






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

...


;

...

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)

...

classlastDetailRow

...

idaddJob-String_Date_Function
Table Row (tr)
idname
Table Cell (td)
addJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob

...






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

...


;

...

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)

...

classlastDetailRow

...

idaddJob-String_Date_Function_Number
Table Row (tr)
idname
Table Cell (td)
addJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob

...






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

...

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)

...

classlastDetailRow

...

idaddJob-String_Date_Function_Number_Number
Table Row (tr)
idname
Table Cell (td)
addJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob

...


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.

...




prs

...


Parameters

...

sIndent

...




jobname


;

...





startDate


;

...





method


;

...





repeatInterval

...


ms

...





repeatCount

...


;

...

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)

...

classlastDetailRow

...

idaddJob-String_Date_Function_Number_Number_Date
Table Row (tr)
idname
Table Cell (td)
addJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob

...






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

...


;

...

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)

...

classlastDetailRow

...

idaddJob-String_Date_Function_Number_Number_Date_ObjectArray
Table Row (tr)
idname
Table Cell (td)
addJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob

...






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

...


;

...

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)

...

classlastDetailRow

...

idaddJob-String_Date_Function_ObjectArray
Table Row (tr)
idname
Table Cell (td)
addJob

...

idsig

...

Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addJob

...






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

...

classlastDetailRow

...

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();

...

classlastDetailRow

...

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');

...

classlastDetailRow

...


;

...

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)

...

classlastDetailRow

...

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






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