Scheduling jobs
Job scheduling allows you to schedule a regular execution of a scenario. You can also add an optional condition that the scenario is executed only if a table (specified by source, space, and table name) was updated since the last execution of the scenario.
To manage schedules click on the Schedule section in the navigation tree. The job scheduling window will open that contains a list of schedules. Each schedule contains the following elements:
-
Status defines whether the schedule is active or deactivated.
-
Scenario name of the scenario to be executed
-
Cron expression, which specifies when the scenario to be executed
-
Last executed date and time
Cron Expression
It is important to keep in mind that InfoLink uses the Quartz dialect of cron that is different from the Unix cron. Quartz is a source job scheduling library implemented in Java. You can find it with documentation at Quartz website .
The main (and maybe the only) difference is that cron expression in Quartz starts with seconds (not minutes as in the Unix cron). So the cron expression “0/30 0 0 ? * * *” means to execute every 30 seconds. If you want to execute it every 30 minutes use “0 0/5 0 ? * * *”.
You can find a good tutorial on Quartz cron at Quartz Cron Trigger Tutorial . This tutorial contains a number of examples. Also this constructor has an easy to use interface to create correct Quartz cron expressions: Cron expression generator - Quartz at freeformatter.com .
Create schedule
To create a new job schedule:
- Open job scheduling window by clicking on the Schedule section in the navigation tree;
- Click on the Add schedule button in at the top of the job scheduling window;
- Enter the following fields:
- Scenario (required): scenario to be executed
- Frequency (required): you can select the frequency using the tabs. In this case Frequency defined above as cron is constructed from your input. Or you can specify the cron expression manually in the Cron expression manual field. The manual cron expression takes precedence over the one specified in the tabs.
- Parameter (optional): the scenario parameters specified in JSON format.
- Data (optional): the scenario input data specified in JSON format.
- User (optinal): the user under which the scenario will be executed. You can only specify the user signed in to Infolink. If the user is not specified, the scenario will be executed without any specific user that means that the master version of the application will be used. You want to specify some user in the following cases:
- When you want to use a checked out version instead of the master version of an app.
- Operations (such as Maintenance) that access the metadata repository will be authorized using the user.
- The next three fields (namely Modified Source Name, Modified Space Name, Modified Table Name) specifies tables any of which must be updated since the last execution of the scenario for the job
to be executed. Leave these fields blank if you do not need to check
for any updates. Modified Table Name is a Java regular
expression: any of the tables that names match the expression must
be updated for the job to be executed. Example of Java regex to
match file name
data.csvexactly:^data\\.csv$Example of Java regex to match any.csvfile containgupdate:^.\*update.\*\\.csv$ - Click the Submit button
- Newly created schedules are inactive. Click on Activate link in the Status column of the schedule list to activate them.
Delete schedule
To delete a job schedule:
-
Open job scheduling window by clicking on the Schedule section in the navigation tree;
-
Click on the delete button in the row representing the schedule you want to delete. On deletion schedule job is deactivated first and then deleted.
Deactivate/activate schedule
To deactivate/activate schedule without deleting it:
-
Open job scheduling window by clicking on the Schedule section in the navigation tree;
-
Click on the Deactivate (or Activate) link in the row representing the schedule you want to deactivate/activate.