How-to-guides
Updated:
August 17, 2023

How to schedule or execute ad-hoc tasks

The system automatically performs actions when users are executing a task or tasks are configured by the administrator to be executed automatically or need to be executed automated. In those cases the administrator can execute scripts to perform reparation, process management, import or other tasks by hand or by scheduling them on regular time intervals. This section covers the available scripts, how to run and/or schedule them and how to view the results of these background executed tasks.

Schedule or execute tasks (scripts)

Via the menu-option Script the administrator can run and/or schedule tasks to perform operations in the system.
The Script menu item provides the option to view the scheduled task and run or schedule new tasks.

Configure or run scripts doing background administrative tasks

In the example above two jobs are scheduled to run on weekdays at certain times at night.
To add a new one, select the script, define the arguments and define the cron parameters (interval and timing).
To modify a script, add a new one and delete the existing script.

Supported scripts in the system are:

  • Calculate staffing - used to re-calculate workforce load on a regular basis.
  • Calculates all studies - used to re-calculate study costs on a regular basis.
  • Cleanup database - remove all data from the database
  • Clear audit logs - remove all audit information from the system
  • Clear logs - clear the different logs (notification, request)
  • Clear the cache - used to refresh the in-memory cache on the server.
  • Generate module CSV - export all (approved) modules for an academic year in CSV format.
    The exported file is available in the administrator configured location and can be retrieved via the administrator menu Report files.
  • Generate module group CSV - export all (approved) module groups for an academic year in CSV format.
    The exported file is available in the administrator configured location and can be retrieved via the administrator menu Report files.
  • Generate schedule CSV - export all (approved) schedules for an academic year in CSV format.
    The exported file is available in the administrator configured location and can be retrieved via the administrator menu Report files.
  • Generate study CSV - export all (approved) studies for an academic year in CSV format.
    The exported file is available in the administrator configured location and can be retrieved via the administrator menu Report files.
  • Generate wizard for workflows - (re-)generate the tasks for the defined processes and workflows
  • Refresh application context - refresh the generic application settings that are configured via a release, without system downtime
  • Refresh view (study usage) - (re)generate the view for study usage on a regular basis
  • Refresh views - (re)generate all views in the system
  • Run export data - used to schedule the interface in case a more batch-oriented messaging is required.
  • Run import data - used to schedule the interface in case a more batch-oriented messaging is required.
  • Run import reference - used to schedule the interface for reference data in case a more batch-oriented messaging is required.
  • Send test mail - sent a test mail to check if the mail configuration is correct.
  • Sends mails for a day - (re)send the mails for a specific day.
  • Start processes on start date - start the processes that are configured to be auto-started on the specified start date.

Scripts can be scheduled using a CRON timing notation.

A CRON time notation is used to specify the timing of the script

Scripts can also be executed ad-hoc.
In that case the script must be selected and the arguments need to be provided. The relevant arguments will be shown after selection of the script.
Offered arguments are:

  • Year - The academic year (version) for which the script must be executed. Is required depending on the selected script.
  • EntityType - The object type (study, module, module group, ...) for which the script must be executed. Is only applicable (and required) for the 're-apply history' script.
  • Directory - The directory to save the generated files. Is only applicable (and required) for the script generating export CSV's
  • Message - The message to report in te logging when executing the script. Is only applicable for the 'run export data' script.
  • System - The system the data has to be sent to when executing the script. Is only applicable (and required) for the 'run export data' script.
  • ReferenceDate - The reference Date the script must be executed. Is only applicable (and required) for the 'mail for a day' script.

View the results of (scheduled) scripts

The menu-option Script can be used by the administrator to automatically schedule or manually execute tasks in the system.
These tasks are run in background, the results are available via the menu option Batch jobs. An overview is provided of al scripts executed including the status and messages of each processed object.

An overview of all executed scripts and their status is available via the Batch jobs menu

The information available in the report is:

  • Type - Script type and unique ID of the executed script.
  • Status - Status indicating if the script has run successfully or has failed.
  • Start date - Timestamp the script is started
  • End date - Timestamp the script is finished
  • Current step - The step the batch job is processing
  • Messages - Number of messages that are processed
    - Grey: Items processed
    - Red: Unsuccessfully processed, no change to system performed due to authorization, status or other rules from preventing change
  • Quantity - Number of objects touched by the job.

Click on the job to open the detail scherm on status and messages.
The first tab shows the parameters used to execute the script.

Example of an executed import task showing time of execution and the used parameters

The second tab provides insight in the messages generated while executing the script.

In case of an Error the task for the object is not processed, in case of a warning or info the task is executed for the object.

The executed script generated errors and warnings that are shown in detail

Customer unique training

This class is available to receive tailor made for your database set-up. Just fill out the form below and our product expert will get in touch with you to set-up your bespoke class.
I want a bespoke class