Child pages
  • scheduler

Versions Compared

Key

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

Cache
indextrue
refresh100d
id

...

Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary

...

Table Cell (td)
void

...

doc
showRefreshtrue
titleRefresh page
showDatetrue
retryEnable

 

 

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListINLINESmartClientsWordListINLINEWebClientsWordListINLINENGClient

 

 

servoy sSummary12%30%58%height: 30px;3Methods SummaryvoidAdds 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

...

Table Cell (td)
String[]

...

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.

...

Table Cell (td)
Boolean

...

Removes a job from the scheduler.

...

 

...

 

function

...

servoy sDetail

...

2

...

100%

...

Col

...

height:30px

...

Table Head (th)
colspan2
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 DetailsaddCronJobname

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

...

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

addCronJob

...

idsig

...

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

...

sIndent

...

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)
 

...

jobname;cronTimings;method;clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addCronJobname

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

...

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)
 

...

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

...

jobname;cronTimings;method;startDate;clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addCronJobname

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

...

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)
 

...

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

...

jobname;cronTimings;method;startDate;endDate;clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addCronJobname

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

...

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)
 

...

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

addJob

...

idsig

...

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

...

jobname;cronTimings;method;startDate;endDate;arguments;clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addJobname

addJob(jobname, startDate, method)

...

des

...

sIndent
Adds a job to the scheduler.

...

prs

...

Parameters

...

sIndent

...

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)
 

...

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

addJob

...

idsig

...

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

...

jobname;startDate;method;clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addJobname

addJob(jobname, startDate, method, repeatInterval)

...

des

...

sIndent
Adds a job to the scheduler.

...

prs

...

Parameters

...

sIndent

...

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)
 

...

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

...

...

jobname;startDate;method;repeatIntervalmsclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addJobname

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

...

des

...

sIndent
Adds a job to the scheduler.

...

prs

...

Parameters

...

sIndent

...

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)
 

...

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

...

...

jobname;startDate;method;repeatIntervalmsrepeatCount;clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addJobname

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

...

des

...

sIndent
Adds a job to the scheduler.

...

...

prs

...

Parameters

...

...

sIndent

...

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)
 

...

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

...

...

jobName;startDate;method;repeatIntervalmsrepeatCount;endDate;clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addJobname

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

...

des

...

sIndent
Adds a job to the scheduler.

...

prs

...

Parameters

...

...

sIndent

...

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)
 

...

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

addJob

...

idsig

...

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

...

...

jobname;startDate;method;repeatIntervalmsrepeatCount;endDate;arguments;clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addJobname

addJob(jobname, startDate, method, arguments)

...

des

...

sIndent
Adds a job to the scheduler.

...

prs

...

Parameters

...

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)
 

...

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

...

sIndent

...

Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void

jobname;startDate;method;arguments;clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getCurrentJobNamesname

getCurrentJobNames()

dessIndent
Returns an array with the current jobs.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getLastRunJobNamename

getLastRunJobName()

dessIndent
Returns the last job run from the scheduler.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
removeJobname

removeJob(jobname)

dessIndent
Removes a job from the scheduler.
prs

Parameters

sIndentjobname;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow