Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

Sample.TaskExample2

class Sample.TaskExample2 extends Sample.Task

Defining a task using output files Perhaps you would like to generate a report to a file and email the file to a group of users when it is completed. In an end user scenario you could have them just define the recipient list and the output directory / filename and the standard report goes out to the group on schedule.

Method Inventory

Methods

method OnTask() as %Status
Your program logic can be here in the OnTask method or in another class or a routine just be sure to return a status code from the OnTask method
classmethod ScheduleOnceDaily() as %Status
this will schedule a task to run Once every day at 10:30 am this example does not take into account any task 'Settings' In this example, if the task has not run within 18 hours and 30 minutes of the scheduled start it will "Expire" and not run again until the next start time

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab