Scheduled Tasks
The Scheduled Tasks are a powerful tool for automating repetitive tasks (a Rule in AppBase). Scheduled Tasks allow users to set up tasks to run at a specified time, either once or on a recurring basis. The tasks can range from simple tasks such as launching an application to complex tasks such as a custom SLA rule for a workflow or generate a weekly report to be sent by email to a manager.
This article will explain what Scheduled Tasks are, how they work and how to set them up. It will also discuss their various advantages and drawbacks.
Schedule a Task
On the top right, navigate to → Application Studio → <<solution>>
- Navigate to Scheduler and Events → Scheduled Tasks from the left-hand navigation menu.
- Click the New Scheduled Task button.
- In the new tab, enter a Task name. The API Permanent ID will be filled based on the task name. It can be modified if you need it.
- Select the Misfire Strategy. By default, use the Do Nothing option. This means that if a scheduled task's trigger was not fired up for any reason, no additional action is taken, this misfire is ignored, and the task is scheduled to run the next time it is configured as expected. The Fire Once Now configure the scheduler task misfire to fire the task's trigger immediately when the scheduler components detect the misfire.
- Select the rule from the dropdown list. In our example, we selected the Extract_SendEmail rule.
- Complete the Parameter section. These parameters depend on the rule selected.
- Select the Frequency (UTC). In our example, we set the rule to be executed every week on Sundays at Eastern midnight, corresponding to 5:00 am UTC (You can use this website to confirm the time settings. https://savvytime.com/converter/est-to-utc)
- Add a Description of the task.
- Save the new Scheduled Tasks.
- Notice that, internally, AppBase will use the quartz cron notation for the scheduler. You can use this online Cron Expression Generator & Explainer : https://www.freeformatter.com/cron-expression-generator-quartz.html
You must deploy any changes to the scheduled tasks.
Modify the Rule Parameters
- Navigate to Scheduler and Events → Scheduled Tasks from the left-hand navigation menu.
- Click the hyperlink of the scheduled task name.
- Select the Events tab to modify the rule settings.
- Select the Rule in the left panel and modify the Parameters in the right panel.
- You can Add more rules and change the order of execution using the arrow icons.
- Save the changes.