Understanding scheduled tasks
System administrators can add scheduled tasks, enabling iMIS to run a task when a pre-defined trigger (Process automation trigger), event, or scheduled time frame occurs. Once a trigger event occurs, iMIS will run the appropriate task.
Each scheduled task can have Process automation Triggers, Conditions, Actions, and Data sources. A scheduled task must contain Process automation Triggers and Actions; Data sources and Conditions are optional.
Determining the task's purpose: Defining the Action
The following types of scheduled tasks that are termed Actions:
- Send a communication - Automatically sends a communication on a scheduled basis. See Sending scheduled communications and Creating an automatic email.
- Calculate engagement scores - Automatically calculates engagement scores. See Scoring.
- Issue and email gift receipts - Select a receipt data source and communication you want to send. See Issuing and viewing charitable receipts.
- Process pending donation premiums - Use this task to process premium orders that were not processed in the iMIS Desktop before you upgraded to iMIS EMS. See Resolving pending premiums.
- Generate recurring donation invoices - Generates a recurring donation batch. Click Run on the Generate invoices tab to run this task. See Generating invoices.
- Generate membership renewals - Generates renewal invoices for members and can be configured to post the related batch. See Automating the membership renewal process.
- Send invoices to Pay Central - You can select an Invoice source query to use as the source of the invoices you want to submit for processing. See Using the 'Retrieve processed payments from Pay Central' scheduled task.
- Retrieve payments from Pay Central - This refreshes the payment status of the submitted payments and writes the submitted payments back to iMIS. Click Retrieve processed payments on the Retrieve processed payments tab to run this task. See Retrieving process payments.
- Run a report - See Sending scheduled reports.
- Run a stored procedure - Enter the name of the stored procedure you want to run. See Using stored procedures in Process automation.
- Run content workflow - Select the communications for the content and navigation workflows. See Managing content set within an expiration.
- Update campaign data- This type can be used to update all related campaigns, appeals, solicitations, and source codes after the output generation takes place. See Monitoring and measuring performance.
Note: Only self-hosted users can run custom stored procedures.
Once you decide on the type of task you want to send, you can define how often the task will run, what conditions must be met in order for the task to run, and the data sources that comprise the task:
Choosing the task frequency: Defining the Trigger
Scheduled tasks are sent based upon a specific occurrence called a Process automation Trigger. For example, the occurrence could be as simple as every Saturday and Wednesday at noon, or on the 15th of each month at 7:00 PM. The frequency combinations of dates and times is truly up to you!
Note: When viewing a scheduled process automation task, staff users can see when the task was last run and when it is due to run again. If there is no scheduled run time, a message displays informing the user.
The second type of scheduled task trigger is called On database change. To minimize performance impacts, it is suggested that this trigger be used sparingly.
Warning! An On database change trigger will fire every time the specified table is accessed. Whenever possible, add your triggers to low-volume tables. Triggers on high-volume tables, such as Trans and ChangeLog can be difficult to troubleshoot and will cause performance problems. Additionally, it is best practice to not enable a trigger on the Invoice, Orders, or Name column.
Circumstances surrounding the task: Specifying Conditions
Conditions allow you to filter when the tasks are sent by specifying query data sources. In order for a task to execute its Actions, the Conditions for a scheduled task must return records when a Process automation Trigger executes.
Example: An enabled scheduled task that sends a communication to all staff members every Monday at 8:00 AM. The purpose of the communication is to inform the staff of any new members who joined on the previous day.
To ensure that communications are not being sent when there are no new members, you would need to add the query that identifies yesterday's new members to the Conditions tab. If that query returns no results, meaning that no new members joined yesterday, then the task will not execute.
New queries added to the Conditions tab automatically appear in the Data sources tab.
Expanding the task: Defining Data sources
Data sources allow you to define and edit IQA queries to be used by Conditions, or within the Actions.
The Data sources tab shows a list of all data sources that are available to be used in the task. This tab is mainly used to manage all data sources being used throughout the task. You can edit any aspect of the data source from this tab, or delete the data source altogether if it is not being used by the task. The data sources can be used in the following areas of the task:
- Conditions - If included as a condition, the task will only run if the data source returns results
- Actions - Insert the data source into an Action where applicable
The same data source can be used in any combination of these, including in multiple different actions. A new data source can be added in the data sources tab, but it can also be added right from where you want to use it - in the Conditions, Alert, or Action.
Reviewing the task: Checking the Logs
You can review Logs to determine which scheduled tasks have been run, which actions have been performed, and whether any scheduled tasks did not complete successfully.
What's next?
- Using out-of-the-box scheduled tasks
- Creating and editing scheduled tasks
- Reviewing the logs for a scheduled task