Class: com.sybase.djc.scheduler.ScheduledTask (Scheduled Task) EAServer 6.3 Help
Description A scheduled task is a background task that runs at server startup, shutdown, or at scheduled intervals during server operation.

For a scheduled task to be active in a server, the scheduled tasks's name must be included in the server's scheduledTasks property.

See also: Service Component. Note that scheduled tasks are activated after service components.

Configuration See Set Properties Task.
Properties afterFailureRun, afterMatchRun, afterSuccessRun, appendOutputFrom, applicationClient, attachOutputFrom, checkFile, componentMethod, dataSource, databaseCommand, dayOfMonth, dayOfWeek, endDate, endTime, exclude, include, interval, lineMatch, logExecution, mailCc, mailFrom, mailMessage, mailSession, mailSubject, mailTo, matchIfCountExceeds, matchIfDeltaExceeds, maximumHeadLines, maximumTailLines, messageQueue, messageTopic, monthOfYear, printFileHead, printFileTail, publishTextMessage, randomWaitOffset, schedule, sendTextMessage, startDate, startTime, systemCommand, taskAction, threadMonitor, waitAfterFailure, waitAfterMatch, waitAfterSuccess
Files Repository/Instance/com/sybase/djc/scheduler/ScheduledTask/*.properties

Property: afterFailureRun (After Failure Run)
Description Specifies the name of another scheduled task that should be run if this scheduled task fails.

Property: afterMatchRun (After Match Run)
Description Specifies the name of another scheduled task that should be run if this scheduled task finds a match.
Only Used If Property taskAction has the value "checkFile".

Property: afterSuccessRun (After Success Run)
Description Specifies the name of another scheduled task that should be run if this scheduled task succeeds.

Property: appendOutputFrom (Append Output From)
Description Appends the output from another task to the e-mail message that will be sent by this task.
Only Used If Property taskAction has the value "sendMailMessage".

Property: applicationClient (Application Client)
Description Not supported in this release.
Only Used If Property taskAction has the value "runApplicationClient".

Property: attachOutputFrom (Attach Output From)
Description Not supported in this release.
Only Used If Property taskAction has the value "sendMailMessage".

Property: checkFile (Check File)
Description Checks whether the lines of a text file match the lineMatch expression.
Only Used If Property taskAction has the value "checkFile".
Default Value ${djc.logFile}

Property: componentMethod (Component Method)
Description Name of a void method from a class implementing an EJB's local or remote interface (e.g. "ejb.components.example.MyTaskLocal.myTaskMethod" or "ejb.components.example.MyTaskRemote.myTaskMethod"), or the name of a void method in a plain Java class (e.g. "com.acme.bank.DailyBackupTask.run").
Only Used If Property taskAction has the value "runComponentMethod".

Property: dataSource (Data Source)
Description The name of a data source which will be used for execution of the databaseCommand.
Only Used If Property taskAction has the value "runDatabaseCommand".

Property: databaseCommand (Database Command)
Description The SQL statement to be executed.
Only Used If Property taskAction has the value "runDatabaseCommand".

Property: dayOfMonth (Day of Month)
Description Comma-separated list of days of the month (1 to 31) on which this task can be executed.
Default Value all
Legal Values 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31

Property: dayOfWeek (Day of Week)
Description Comma-separated list of days of the week (1 = Monday to 7 = Sunday) on which this task can be executed.
Default Value all
Legal Values 1, 2, 3, 4, 5, 6, 7

Property: endDate (End Date (YYYY-MM-DD))
Description The last date on which this task can be executed.

Property: endTime (End Time (HH:MM))
Description The latest time in the day that this task can be executed.

If startTime > endTime, the task runs between startTime in the evening to endTime the next morning.

Only Used If Property schedule is not empty.

Property: exclude (Exclude (YYYY-MM-DD,...))
Description Comma-separated list of dates (in format "YYYY-MM-DD") on which this task must not execute.

Property: include (Include (YYYY-MM-DD,...))
Description Comma-separated list of dates (in format "YYYY-MM-DD") on which this task must execute, even if not otherwise indicated by the schedule parameters.

Property: interval (Specified Interval)
Description The number of seconds between iterations for this task.
Only Used If Property schedule has the value "interval".
Default Value 1
Minimum Value 1
Maximum Value 2147483647

Property: lineMatch (Line Match)
Description Match condition if the syntax of a SQL where clause or JMS selector expression. The variable line can be referenced in this expression to refer to the current line being tested for a match.
Only Used If Property taskAction has the value "checkFile".
Default Value line like '%SomeText%'

Property: logExecution (Log Execution)
Description Print a message to the server log each time this task is executed.
Default Value false
Legal Values false, true

Property: mailCc (Cc)
Description Comma-separated list of e-mail addresses for "Cc:" mail header.
Only Used If Property taskAction has the value "sendMailMessage".

Property: mailFrom (From)
Description E-mail address for "From:" mail header.
Only Used If Property taskAction has the value "sendMailMessage".

Property: mailMessage (Message)
Description Message to be sent in e-mail. This can reference Java system properties as "${systemPropertyName}". It can also reference the match count (number of line matches) as "${count}", and the match delta (increase in count since last run of this task) as "${delta}".
Only Used If Property taskAction has the value "sendMailMessage".

Property: mailSession (Mail Session)
Description The name of a configured mail session.
Only Used If Property taskAction has the value "sendMailMessage".
Default Value default

Property: mailSubject (Subject)
Description Subject for e-mail. This can reference Java system properties as "${systemPropertyName}". It can also reference the match count (number of line matches) as "${count}", and the match delta (increase in count since last run of this task) as "${delta}".
Only Used If Property taskAction has the value "sendMailMessage".

Property: mailTo (To)
Description Comma-separated list of e-mail addresses for "To:" mail header.
Only Used If Property taskAction has the value "sendMailMessage".

Property: matchIfCountExceeds (Match If Count Exceeds)
Description Minimum number of line matches required before this task will call the afterMatchRun task.
Only Used If Property taskAction has the value "checkFile".
Default Value 2147483647
Minimum Value 0
Maximum Value 2147483647

Property: matchIfDeltaExceeds (Match If Delta Exceeds)
Description Minimum change in the number of line matches (since last call to this task) required before this task will call the afterMatchRun task.
Only Used If Property taskAction has the value "checkFile".
Default Value 2147483647
Minimum Value 0
Maximum Value 2147483647

Property: maximumHeadLines (Maximum Head Lines)
Description Maximum number of lines that will be printed from the beginning of printFileHead.
Only Used If Property taskAction has the value "printFileHead".
Default Value 1000
Minimum Value 0
Maximum Value 2147483647

Property: maximumTailLines (Maximum Tail Lines)
Description Maximum number of lines that will be printed from the end of printFileTail.
Only Used If Property taskAction has the value "printFileTail".
Default Value 1000
Minimum Value 0
Maximum Value 2147483647

Property: messageQueue (Message Queue)
Description Name of JMS message queue to which a message will be sent.
Only Used If Property taskAction has the value "sendTextMessage".

Property: messageTopic (Message Topic)
Description Name of JMS message topic to which a message will be published.
Only Used If Property taskAction has the value "publishTextMessage".

Property: monthOfYear (Month of Year)
Description Comma-separated list of months of the year (1 = January to 12 = December) in which this task can be executed.
Default Value all
Legal Values 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

Property: printFileHead (Print File Head)
Description Name of a file whose "head" lines will be printed. This type of task is usually used as the target of appendOutputFrom from an e-mail sending task.
Only Used If Property taskAction has the value "printFileHead".
Default Value ${djc.logFile}

Property: printFileTail (Print File Tail)
Description Name of a file whose "tail" lines will be printed. This type of task is usually used as the target of appendOutputFrom from an e-mail sending task.
Only Used If Property taskAction has the value "printFileTail".
Default Value ${djc.logFile}

Property: publishTextMessage (Publish Text Message)
Description Body for JMS text message which will be published.
Only Used If Property taskAction has the value "publishTextMessage".

Property: randomWaitOffset (Random Wait Offset)
Description Should the wait interval between iterations of this task be randomly varied to reduce the likelihood of resource contention between multiple servers (e.g. in a cluster) which are all running this task.
Default Value false
Legal Values false, true

Property: schedule (Schedule)
Description How often should this task run.

See also: interval.

Default Value daily
Legal Values startup, shutdown, interval, second, minute, hourly, daily, weekly, monthly

Property: sendTextMessage (Send Text Message)
Description Body for JMS text message which will be sent.
Only Used If Property taskAction has the value "sendTextMessage".

Property: startDate (Start Date (YYYY-MM-DD))
Description The first date on which this task can be executed.

Property: startTime (Start Time (HH:MM))
Description The earliest time in the day that this task can be executed.

If startTime > endTime, the task runs between startTime in the evening to endTime the next morning.

Only Used If Property schedule is not empty.

Property: systemCommand (System Command)
Description Operating system command to be run. This might be used, for example, to initiate a file system or database backup.
Only Used If Property taskAction has the value "runSystemCommand".

Property: taskAction (Task Action)
Description Required. Indicates what type of action this task should execute.
Default Value runComponentMethod
Legal Values checkFile, printFileHead, printFileTail, publishTextMessage, runApplicationClient, runComponentMethod, runDatabaseCommand, runSystemCommand, sendMailMessage, sendTextMessage

Property: threadMonitor (Thread Monitor)
Description Name of a configured thread monitor to be entered while executing this task (but not while waiting between iterations).

Property: waitAfterFailure (Wait After Failure)
Description The minimum number of seconds to wait before another iteration of this task if it fails.
Default Value 0
Minimum Value 0
Maximum Value 2147483647

Property: waitAfterMatch (Wait After Match)
Description The minimum number of seconds to wait before another iteration of this task if it matches.
Only Used If Property taskAction has the value "checkFile".
Default Value 0
Minimum Value 0
Maximum Value 2147483647

Property: waitAfterSuccess (Wait After Success)
Description The minimum number of seconds to wait before another iteration of this task if it succeeds.
Default Value 0
Minimum Value 0
Maximum Value 2147483647