Scheduler in Encodify system is a handy functionality that allows executing certain tasks in the system periodically, over the specified time interval. For example, synchronizer job can be set to run with a certain interval to synchronize the records in the user’s file system and EBMS, according to the specified configuration.
Work with the scheduler in the system that is available for configuration and launching in the System properties allows to:
Configure scheduler jobs
Start and Stop scheduler jobs
Monitor scheduler tasks being currently executing
Configure Scheduler Jobs
Before running the scheduler job it should be configured in Scheduler.properties specifying the name of the job, job tasks and their parameters. Scheduler job can have several tasks, each having its parameters. To configure Scheduler properties, perform the following steps:
Go to System Configuration > Sites > System Status > Scheduler.
On the Scheduler page, click Scheduler Properties.
In the Scheduler properties window that opens, add a new job or edit the properties of the existing one in a free text.
As a rule, configuration of the scheduler job includes:
The name of the job that is entered in the following format: “joblist={Job_Name}”.
Job tasks and their properties, including side ID, interval and other.
It is also possible to specify user on behalf of which job will be executed. User will be required for sending valid JWT tokens in MediaFile links.
All the actions that are performed by the scheduler will be executed by the specified user ID. Therefore, it is recommended to grant the user site administration rights to avoid any issues with access for scheduler jobs.
Example of the job configuration
joblist=fieldImport
job.fieldImport.param.UserID=11536
job.fieldImport.type=dk.encode.ebms.scheduler.FieldImportJob
job.fieldImport.interval=10
You can have several jobs specified and set up in your Scheduler properties, but only one job can be run at a time. Therefore, only one scheduler job can be active for running the scheduler. All the other should be inactive. In order to make the scheduler job inactive enter “#” before “joblist={Job_Name}”.
Note!
Access to the Scheduler Properties is configurable, therefore the Scheduler Properties button is not available to all the users.
In order to grant the user access to the Scheduler Properties specify the following in the
System.properties
file:schedulerPropertiesEditors={ID of the user}
You can grant access to several users, separating their IDs by comma. If you want all users to be able to edit Scheduler Properties, put asterisk sign
*
instead of the ID.
Click Save Changes to apply modifications that have been made.
Manage Scheduler Jobs
After you have configured the scheduler job, you can start the scheduler in order to begin executing the scheduler tasks.
Run the Scheduler job by performing the following steps:
Go to the Scheduler page by clicking System Configuration>Sites > System Status > Scheduler.
If no jobs have been previously launched, the Scheduler status is “Currently stopped”, and you will see the corresponding information message in the Running Scheduler Jobs section.
Click the Start Scheduler button to launch job execution. Job status will be changed to “Currently running”. In the Running Scheduler section, the list of all scheduler tasks currently being executed will be displayed. Next to each task, you will see the status, which can be either “Running” or “Stopped”. The “Stopped” status indicates that the job has been completed.
If you want the job to be executed only once, click Stop Scheduler on the toolbar. The Scheduler will be stopped as soon as all tasks are completed.
Otherwise, the scheduler will launch the job periodically with the interval specified in Scheduler properties. In this case, use the Refresh button to track the status of each task being executed.