Apart from manually executing a job, there is also an option to schedule the job in the production environment, enabling the ability to set up recurring executions. There are multiple options available for setting up job schedules, providing flexibility to meet different requirements.
Please note that the option to schedule a job is available only for the production workflow. To enable the 'Schedule' option for any job, follow these steps:
- Open the application.
- Click the 'Operations' icon available under the Production workflow.
- Click the 'Jobs' tab.
- Select the job you want to schedule. This will open the job details on the right side.
- Click the 'Configure' tab.
- Scroll to the end of the page and find the 'Schedule' toggle.
- Enable the 'Schedule' toggle.
- Once the 'Schedule' toggle is on, you will see the schedule options as shown below:
Scheduling Options
Syntasa offers a variety of scheduling options for recurring job execution, providing flexibility to meet a wide range of scheduling needs. From simple recurring tasks to complex job chains and event-driven workflows, Syntasa's scheduling options can be categorized into three main types:
-
Crontab Scheduling:
-
Utilizes a (quartz) cron expression for advanced and flexible scheduling capabilities.
- Use Case: Ideal for defining specific schedules based on time and date parameters, allowing for precise control over job execution intervals, including complex recurring patterns.
- Example: A job that runs at 2 AM every day (0 2 * * *) or every 15 minutes between 9 AM and 5 PM on weekdays. (0/15 9-17 * * 1-5)
-
-
Time-Based Scheduling:
- Provides simpler scheduling options where users can specify a specific time or frequency for job execution.
-
Options:
- Daily: Runs the job once a day at a specified time.
- Hourly: Runs the job every hour.
- Weekly: Runs the job once a week on a specified day and time.
- Monthly: Runs the job once a month on a specified date and time.
- Use Case: Suitable for straightforward scheduling needs without requiring complex expressions.
- Example: A job scheduled to run at 8 AM every day, or every Monday at 3 PM.
-
Triggering:
- Allows job chaining based on dependencies between jobs or steps within a job.
-
Options:
- Job Completion: Trigger a job upon the successful completion of another job.
- Step Completion: Trigger a job upon the successful completion of specific steps within a job.
- File Delivery: Trigger a job or step upon the arrival of specific files.
- Crontabs: Allows for scheduling based on predefined cron patterns.
- Use Case: Ideal for creating complex workflows where jobs depend on the completion of other jobs or specific events.
- Example: A job that starts immediately after another job finishes or a job that triggers when a specific file is uploaded to a directory.
Let's understand each scheduling tab with an example:
-
Crontab - The Crontab option accepts a Quartz cron expression to define a recurring schedule that may be more nuanced than a basic recurring schedule, e.g. first Monday of every month.
-
Hourly - The Hourly option allows a job to run every hour. It accepts an integer between 0 and 59 to define the minute of the hour the job is to run.
-
Daily - The Daily option allows a job to run once a day. It accepts integers for the Hour field, ranging from 1 to 12, and for the Minute field, ranging from 0 to 59. Additionally, it requires a selection for AM or PM.
- Weekly - The Weekly option allows a job to run once a week. It accepts integers for the Hour field, ranging from 1 to 12, and for the Minute field, ranging from 0 to 59. Additionally, it requires a selection for AM or PM, and a selection for the day of the week.
-
Monthly - The Monthly option allows a job to run once a month. It accepts integers for the Hour field, ranging from 1 to 12, and for the Minute field, ranging from 0 to 59. Additionally, it requires a selection for AM or PM, and an integer between 1 and 31 for the day of the month.
-
Trigger: Starting from Syntasa version 5.0, there's an option to schedule a job based on the completion of one or more events, rather than relying on static execution dates and times. This feature, known as pipeline orchestration, enables the coordination and chaining of job executions across multiple pipelines.
To make use of the trigger functionality, one or more events need to be selected. Subsequently, the current job will execute upon the completion of the configured event(s).
As shown in the above screenshot, there are five event types available:- Adobe Feed Watcher: You can select the Adobe Feed Watcher event type to trigger a job whenever an Adobe Feed Watcher event occurs. To learn more about different event types, please click here.
- File Watcher: You can select the File Watcher event type to trigger a job whenever a File Watcher event occurs. To learn more about different event types, please click here.
- Job: Selecting the event type as Job enables the user to choose an existing app and a specific job within that selected app.
-
Process: Choosing the event type Process empowers the user to choose an existing app, a particular job within that chosen app, and a specific process within the selected job. This level of detail offers more precise controls, enabling the current job to execute when a specific step of the dependent job completes, rather than waiting for all steps to finish.
Moreover, when employing this event type, it's feasible to set the job value to Any. This configuration ensures that the current job will execute when any job within the selected app completes the specified process.
-
Time - Selecting the event type value Time allows the user to specify a Quartz cron expression exactly as when using the Crontab based schedule, but in this context is intended to be used in conjunction with another event.
For example, the current job can be configured to execute after another job completes, but only after a certain time. In this case, it is required to define the event type of value Job or Process, an event type of Time, along with the And option () to ensure both events are satisfied before the current job is executed.
Another example is that the current job can be configured to execute after another job completes, but also run the current job by a certain time if the dependent job has failed to complete. In this case, it is required to define the event type of value Job or Process, an event type of Time, along with the Or option () to ensure either of the events are satisfied so that the current job can be executed.