Hourly, daily, weekly, monthly…our recurring tasks keep running

3 minute read time.

One of the great features in Sage X3 is the Recurring tasks management (under Usage, Batch server). Hourly, daily, weekly, monthly…our reports or other tasks will run without the need of our intervention. We don’t have to dread staying late or signing in during the middle of the night to run tasks. We don’t have to have those “Oops” moments when we forget to run them. Here’s what Online Help has to say about Recurring tasks management.

Use this function to define recurring tasks that are launched regularly by the batch server. These recurring tasks are run based on a defined schedule. This includes batch tasks or linked batch tasks. You can define all or part of the settings linked to the task execution rules such the current period and frequency.

Technical operation of the recurring tasks

When starting the batch server (or after midnight, when the batch server operates continuously), all the recurring tasks in a day are created in the form of task execution requests that can be seen in batch task management.

For recurring tasks with a defined frequency, a single execution request is created; when the task is executed, a new execution request is created.

This means once the first execution for a recurring task with a defined frequency is launched:

In the request management, any interruption (if it is in progress), or deletion (if it is pending) of the next execution stops the process, which will be launched again the following day.

By default, any modification to the frequency will not be taken into account until the following day.

Let’s look at the Recurring Task I set up for the Stock Accounting Interface: FUNSTKACC

Note that the Recurring task code and the Task Code do not have to be the same. The Recurring task code should be one that is easily identifiable to you.

I have set mine to run every day during the week at 12:00 and 23:00. Time is set in military format.

 

I can’t make the task active until I click Create and save my Parameters. I receive the following message if I try to select Active before I have dealt with the Parameters.

 

Note that the Parameters screen looks just the same as if you ran if from the main menu. For the FUNSTKACC’s parameters, the Processing date (PRODAT) must be cleared or this will only run through that date. We will set the PRODAT on the Relative Date grid. For Financial site, I have selected NA012. If left blank, it would run for all the sites. I click OK to return to the Recurring task screen.

In the Relative Date grid, I selected a value for PRODAT. It will run with the current date.

I can now select Active and it is ready to go.

 

We can now go to Query management under Usage, Batch server and see the FUNSTKACC is scheduled to run at 12:00 and 23:00.

What if there are other tasks still running at 12:00 and 23:00 or the server isn’t on? Will my tasks still run? We can select the Forced execution option to ensure it will. From the Help:

This check box can only be selected if fixed execution times are indicated for a recurring task. It ensures that the execution request is created, even if the time is exceeded at the moment when the batch server processes the recurring tasks for the day.

 For instance, if a task is planned for 07:00, 10:00 and 15:00, but the batch server starts in the morning at 08:00:

 If selected, 3 execution requests are created (at 07:00, 10:00 and 15:00). The execution request starting at 07:00 will be executed or not depending on the server parameters (it is possible to specify a maximum execution delay in the server parameters). In any case, a line will have been planned for 07:00.

If not selected, only the two execution requests later than the current time will be created.

 

 

But what if I want to run tasks sequentially? Will I have to stay late for that? In my next installment, we will look at using Groups of tasks to handle sequential processing.