Child pages
  • scheduler

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
{div:style=}
Wiki Markup
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.

\\ \\ Enter additional information related to this



Enter additional information related to this 'class'

inside

the

\

{div}

macro

with

'id=description'

{div} {div:id=description}{note:title=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| Batch Processor] for information how to continuously run methods in the background, in a client that will not be closed (automatically){note}{div}\\ {table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}void{td}{td}[#addCronJob]\(jobname, cronTimings, method) Adds a cron job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addCronJob]\(jobname, cronTimings, method, startDate) Adds a cron job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addCronJob]\(jobname, cronTimings, method, startDate, endDate) Adds a cron job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addCronJob]\(jobname, cronTimings, method, startDate, endDate, arguments) Adds a cron job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addJob]\(jobname, startDate, method) Adds a job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addJob]\(jobname, startDate, method, repeatInterval) Adds a job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addJob]\(jobname, startDate, method, repeatInterval, repeatCount) Adds a job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addJob]\(jobName, startDate, method, repeatInterval, repeatCount, endDate) Adds a job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addJob]\(jobname, startDate, method, repeatInterval, repeatCount, endDate, arguments) Adds a job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addJob]\(jobname, startDate, method, arguments) Adds a job to the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getCurrentJobNames]\() Returns an array with the current jobs.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getLastRunJobName]\() Returns the last job run from the scheduler.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeJob]\(jobname) Removes a job from the scheduler.{td}{tr}{tbody}{table}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=addCronJob-String_String_Function}{tr:id=name}{td}h6.addCronJob{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}addCronJob{span}{span}\(jobname, cronTimings, method){span}{td}{tr}{tr:id=des}{td}{div:class=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).{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname \{[String]} cronTimings \{[Function]} method {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}

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)


HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addCronJob(jobname, cronTimings, method)
Adds a cron job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addCronJob(jobname, cronTimings, method, startDate)
Adds a cron job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addCronJob(jobname, cronTimings, method, startDate, endDate)
Adds a cron job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addCronJob(jobname, cronTimings, method, startDate, endDate, arguments)
Adds a cron job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addJob(jobname, startDate, method)
Adds a job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addJob(jobname, startDate, method, repeatInterval)
Adds a job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addJob(jobname, startDate, method, repeatInterval, repeatCount)
Adds a job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addJob(jobName, startDate, method, repeatInterval, repeatCount, endDate)
Adds a job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addJob(jobname, startDate, method, repeatInterval, repeatCount, endDate, arguments)
Adds a job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#addJob(jobname, startDate, method, arguments)
Adds a job to the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)
#getCurrentJobNames()
Returns an array with the current jobs.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getLastRunJobName()
Returns the last job run from the scheduler.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeJob(jobname)
Removes a job from the scheduler.

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
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
Span
(jobname, cronTimings, method)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} jobname
{String} cronTimings
{Function} method
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)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idaddCronJob-String_String_Function_Date
}{
Table Row (tr)
:
id
=
name
}{td}h6.addCronJob{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
addCronJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}
void
{span}{span:style=
Span
stylefont-weight:
bold;
}
addCronJob
{span}{span}\
Span
(jobname,
cronTimings,
method,
startDate)
{span}{td}{tr}{tr:id=des}{td}{div:class=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).{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname \{[String]} cronTimings \{[Function]} method \{[Date]} startDate {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} jobname
{String} cronTimings
{Function} method
{Date} startDate
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)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idaddCronJob-String_String_Function_Date_Date
}{
Table Row (tr)
:
id
=
name
}{td}h6.addCronJob{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
addCronJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}
void
{span}{span:style=
Span
stylefont-weight:
bold;
}
addCronJob
{span}{span}\
Span
(jobname,
cronTimings,
method,
startDate,
endDate)
{span}{td}{tr}{tr:id=des}{td}{div:class=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).{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname \{[String]} cronTimings \{[Function]} method \{[Date]} startDate \{[Date]} endDate {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} jobname
{String} cronTimings
{Function} method
{Date} startDate
{Date} endDate
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)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idaddCronJob-String_String_Function_Date_Date_ObjectArray
}{
Table Row (tr)
:
id
=
name
}{td}h6.addCronJob{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
addCronJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}
void
{span}{span:style=
Span
stylefont-weight:
bold;
}
addCronJob
{span}{span}\
Span
(jobname,
cronTimings,
method,
startDate,
endDate,
arguments)
{span}{td}{tr}{tr:id=des}{td}{div:class=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).{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname \{[String]} cronTimings \{[Function]} method \{[Date]} startDate \{[Date]} endDate \{[Object]\[]} arguments {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} jobname
{String} cronTimings
{Function} method
{Date} startDate
{Date} endDate
{Object[]} arguments
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)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idaddJob-String_Date_Function
}{
Table Row (tr)
:
id
=
name
}{td}h6.addJob{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
addJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}
void
{span}{span:style=
Span
stylefont-weight:
bold;
}
addJob
{span}{span}\
Span
(jobname,
startDate,
method)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Adds a job to the scheduler.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname \{[Date]} startDate \{[Function]} method {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} jobname
{Date} startDate
{Function} method
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)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idaddJob-String_Date_Function_Number
}{
Table Row (tr)
:
id
=
name
}{td}h6.addJob{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
addJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}
void
{span}{span:style=
Span
stylefont-weight:
bold;
}
addJob
{span}{span}\
Span
(jobname,
startDate,
method,
repeatInterval)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Adds a job to the scheduler.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname \{[Date]} startDate \{[Function]} method \{[Number]} repeatInterval -- ms {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{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)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idaddJob-String_Date_Function_Number_Number
}{
Table Row (tr)
:
id
=
name
}{td}h6.addJob{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
addJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}
void
{span}{span:style=
Span
stylefont-weight:
bold;
}
addJob
{span}{span}\
Span
(jobname,
startDate,
method,
repeatInterval,
repeatCount)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Adds a job to the scheduler.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname \{[Date]} startDate \{[Function]} method \{[Number]} repeatInterval -- ms \{[Number]} repeatCount {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} jobname
{Date} startDate
{Function} method
{Number} repeatInterval – ms
{Number} repeatCount
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) {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
,endDate)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idaddJob-String_Date_Function_Number_Number_Date
}{
Table Row (tr)
:
id
=
name
}{td}h6.addJob{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
addJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}void{span}{span:style=
void
Span
stylefont-weight:
bold;
}
addJob
{span}{span}\
Span
(jobName,
startDate,
method,
repeatInterval,
repeatCount,
endDate)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Adds a job to the scheduler.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobName \{[Date]} startDate \{[Function]} method \{[Number]} repeatInterval -- ms \{[Number]} repeatCount \{[Date]} endDate {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} jobName
{Date} startDate
{Function} method
{Number} repeatInterval – ms
{Number} repeatCount
{Date} endDate
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)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idaddJob-String_Date_Function_Number_Number_Date_ObjectArray
}{
Table Row (tr)
:
id
=
name
}{td}h6.addJob{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
addJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}
void
{span}{span:style=
Span
stylefont-weight:
bold;
}
addJob
{span}{span}\
Span
(jobname,
startDate,
method,
repeatInterval,
repeatCount,
endDate,
arguments)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Adds a job to the scheduler.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname \{[Date]} startDate \{[Function]} method \{[Number]} repeatInterval -- ms \{[Number]} repeatCount \{[Date]} endDate \{[Object]\[]} arguments {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} jobname
{Date} startDate
{Function} method
{Number} repeatInterval – ms
{Number} repeatCount
{Date} endDate
{Object[]} arguments
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)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idaddJob-String_Date_Function_ObjectArray
}{
Table Row (tr)
:
id
=
name
}{td}h6.addJob{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
addJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}
void
{span}{span:style=
Span
stylefont-weight:
bold;
}
addJob
{span}{span}\
Span
(jobname,
startDate,
method,
arguments)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Adds a job to the scheduler.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname \{[Date]} startDate \{[Function]} method \{[Object]\[]} arguments {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Adds a job to the scheduler.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} jobname
{Date} startDate
{Function} method
{Object[]} arguments
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)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCurrentJobNames}{tr:id=name}{td}h6.getCurrentJobNames{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getCurrentJobNames{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns an array with the current jobs.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}

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()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getLastRunJobName}{tr:id=name}{td}h6.getLastRunJobName{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getLastRunJobName{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the last job run from the scheduler.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeJob-String}{tr:id=name}{td}h6.removeJob{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeJob{span}{span}\(jobname){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a job from the scheduler.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} jobname {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Table Row (tr)
classlastDetailRow
Table Cell (td)