About background tasks
Background tasks are operations or activities that can be set up to run in the background. Many reports, utilities, and some activities can be scheduled to run daily, weekly, or monthly. After the process is scheduled, it runs automatically in the background at a set time, using your selection criteria and option settings.
Most reports that are run as background tasks are placed on a list of active background tasks, to be run as scheduled or demanded. You can also set up other tasks to run in the background. The Infor Framework TaskMan service regularly polls the list of active background tasks and executes any task that is posted as READY to be executed.
Forms used with background tasks
These are the basic forms and utilities associated with background tasks:
- Background Task Definitions: Use this form to create records that define and identify background tasks for TaskMan. TaskMan then monitors the application database in order to execute these defined background tasks, either on demand or as scheduled.
- Active Background Tasks: Use this form to schedule background tasks and to view the statuses of background tasks that are waiting to execute or are in progress.
- Background Task History: Use this form to display information about background tasks that have been run, and whether they completed successfully. If not, this form also displays associated error messages.
- Active Background Task Purge Utility: Use this form to purge (usually) long-running active background tasks that are in READY or RUNNING status. This utility can be used for tasks that have become "hung" or that have been created accidentally and are no longer needed.
- Background Queue: Use this form to specify when and/or how often, the task from the 'parent' form is to run.
Guidelines for creating background tasks
Background tasks must meet these requirements:
- The task name should match the form name, to make it easier to identify.
- Stored procedures must be written in SQL and reside in your SQL Application Database. Utility and activity forms generally use the Executable Type: (stored procedure).
- Executable programs must reside in a directory available to the directory where TaskMan resides.
- These types of reports are
supported as background tasks:
- : Reports based on predefined DataViews and their layouts.
- : Reports created using the Report form type.
- : (Deprecated) Reports created using Microsoft SQL Server Reporting Services (SSRS).
Note: To enable the Report Type options, you must select (Report) as the Executable Type. - IDO methods, as background tasks, specify a method name (in the format IDO.Method--for example, MyProgID.SLSites.MyTestMethod)--and use the Executable Type . When processing tasks of this type, TaskMan requires a configuration with the same name as the site name. On the machine where TaskMan is running (typically the application server), you must create a configuration where the configuration name matches the database site name, if one does not already exist.
For more information, see Creating a background task definition.
Background task statuses
- : The task has been submitted and is ready to execute.
- : The task is currently executing.
- : The task is scheduled and on hold until some requirement (usually the scheduled day/time) is met.
- READY or RUNNING. : The task is a scheduled task that has spawned a 'child' task that is either
The status of a task that has already run or is currently running displays on the Background Task History form. The status indicates one of these cases:
- Error Message field. : The task failed to finish and generated an error. The explanation of the error is provided in the
- Error Message field. : The task was cancelled at the request of a user. When this is the case, the explanation of the cancellation is provided in the
Scheduling background tasks
Background tasks are set up using the Background Task Definitions form. They can also be scheduled to run on a once-only or recurring basis using the Active Background Tasks form or the Background Queue form.
- Forms can only be scheduled to run as background tasks if they have the option available on the menu.
- To schedule (and run) background tasks, you must have the Infor Framework Event Service configured and running.
Once scheduled, background tasks can only be deleted if they have a Status of WAITING on the Active Background Tasks form. Tasks that are in a status of READY or RUNNING can be canceled without deleting them.