Scheduling Server Automation Scripts
In FintechOS Studio, engineers can plan an automation script to run periodically by using the Scheduling feature.
A scheduled job can be set up to run at a fixed interval of time starting with Start Time (Pool Time) or using a Cron Expression.
To schedule a server automation script, follow tese steps
STEP 1. Add schedule job
To add a scheduled job, follow these steps:
- From the menu, click Business Automation > Scheduled Jobs. The Scheduled Jobs List page appears.
- At the top-right corner of the page, click the Insert icon. The Add Scheduled Job page appears.
- Fill in the mandatory fields (marked with a red asterix).
- (Optionally) If you want to set up specific days when the job will not execute, in the Calendar (exclude days) field , provide the code to do so. The types of calendar exclusion can be: ANNUAL (dd.MM), MONTHLY (dd), WEEKLY (days in week: Monday, Tuesday, .etc), HOLIDAY (dd.MM.yyyy).
- Tick the Enabled checkbox to enable the scheduled job, otherwise it will not run.
- At the top-right corner of the page, click the Save and reload icon. The record is saved in the system and the Edit Scheduled Job page appears.
Now you can add schedule services.
STEP 2. Add schedule services
- In the Edit Scheduled Job page, scroll-down to the Schedule Services section and click the Insert button. The Add Schedule Service page appears.
- In the Name field, provide a name for the service.
- Click the down arrow next to the Workflow field. A pop-up appears listing all existing server automation scripts.
- Select the server automation script you want to schedule by double-clicking on it.
- At the top-right corner of the page, click the Save and close icon to save the record. Add as schedule services as automation scripts you want to schedule for execution.
If you have more than one scheduled service in the Schedule Services list, you can set their execution order.
STEP 3. Set the execution order
If you have several automation scripts scheduled and need them to be run in a specific order, drag and drop records in the Schedule Services section in their execution order (whereas the first record in the section is the first one to be executed).
If you choose that one of the service is mandatory and it fails, all the following services (scripts) will no longer execute. Also, if you will choose to run script async (when adding /editing a schedule service by selecting the Async checkbox), the order of services will be disregarded and all automation scripts will run in parallel.
Job Server is aware of jobs changes (time, cron expression, reorder of services).
For all failed jobs, a Run now button is displayed which allows running the jobs again. The job data model has been updated to include a parent job id. When running a failed job (clicking the Run now button), a copy of the job is made having the parentJobId = original Job and it will be scheduled to run only once in 1 minute.