Job Scheduler is a flexible framework built on Liferay’s scheduler engine for running and scheduling business logic. This framework uses the DispatchTaskExecutor interface to define templates with custom logic that you can use to create tasks via the Control Panel. You can configure its behavior and execution schedule after creating the Job Scheduler task.
Important
Only administrators can view the Job Scheduler application.
Open the Global Menu (), click Control Panel, and go to Configuration → Job Scheduler.
Click Add () and select the desired template for your Job Scheduler Task. The selected template defines the Task’s default logic.
Each template is an implementation of the DispatchTaskExecutor interface, and each Job Scheduler task is an instance of the selected template. See Job Scheduler Dispatch Framework Reference for more information about how it works.
Note
Liferay DXP provides a variety of Job Scheduler task templates, while Liferay Portal only includes the Talend Job Scheduler Task Executor. See Creating Job Scheduler Templates to learn how to create your own templates.
Enter a name for the Job Scheduler task.
(Optional) Use the settings editor to define properties injected at runtime for the Job Scheduler task.
You can use these settings to fine-tune the execution flow and more.
All settings added in this way are soft-coded, so you can configure your Job Scheduler tasks without having to edit and redeploy the Executor’s code.
Tip
You can create multiple instances of the same Job Scheduler Task Executor and modify their properties and behavior using the settings editor.
Click Save to create a new Job Scheduler task for the selected template.
All Job Scheduler tasks added to an instance appear on the Job Scheduler page. From here, you can click the task to edit its settings or configure its Job Scheduler Trigger to schedule when it runs. You can also click Run Now to execute the task manually. The Logs tab shows a record of all executions for the selected Job Scheduler task.
By default, all Job Scheduler task triggers are inactive at creation. Follow these steps to activate a Task’s Job Scheduler Trigger and schedule when it runs:
Go to the Job Scheduler Triggers tab in the Job Scheduler page and click the desired task.
Click the Job Scheduler Trigger tab and configure the fields below.
Click Save.
Active: Activate or deactivate the Job Scheduler Trigger. To activate the trigger, you must enter a valid cron expression. When active, the Job Scheduler task executes according to the set schedule. Deactivating it prevents the Trigger from running.
Task Execution Cluster Mode: Determine whether the Job Scheduler task is run on one or all nodes in a clustered environment.
Overlap Allowed: Enable or disable concurrent execution for the Job Scheduler task. When enabled, new task executions are initiated according to the set schedule, regardless of whether a previous execution is still running.
Time Zone: Select a time zone for the execution of the Job Scheduler task. This is independent of the time zone of your Liferay instance. This field is available starting from Liferay DXP 7.4 U35+/GA35+.
Cron Expression: Enter a valid cron expression to determine when the Job Scheduler task is executed.
Start Date: Determine the Job Scheduler task’s start date.
End Date: Use the checkbox to determine when the Job Scheduler task is no longer executed by the cron schedule. It is set to the current date and time by default.
The Job Scheduler task now starts automatically and stops at your specified date/time and according to the cron intervals.
Talend is open source data integration software for defining custom data integration jobs. These jobs are exported as a .zip archive and uploaded to any Job Scheduler task that uses the Talend executor template. Once uploaded, the Talend data integration job is executed whenever the Job Scheduler task is run.
Follow these steps to upload a Talend Job Archive to a Job Scheduler task:
Add a new Job Scheduler task to your instance using the Talend executor template. See Adding a New Job Scheduler Task for detailed instructions.
Go to the Job Scheduler Triggers tab in the Job Scheduler page and click on the desired task.
Tasks created using the DispatchTaskExecutor interface are more adaptable because you can edit them at runtime through the job scheduler application UI. Changes to SchedulerJobConfiguration jobs must be coded, compiled, and redeployed. The Job Scheduler UI also provides a more complete overview of each task’s execution properties (e.g., cron expression, start/end date, cluster mode) and execution history. This information is not provided for SchedulerJobConfiguration jobs.
This website uses cookies and similar tools, some of which are provided by third parties (together “tools”). These tools enable us and the third parties to access and record certain user-related and activity data and to track your interactions with this website. These tools and the informationcollected are used to operate and secure this website, enhance performance, enable certain website features and functionality, analyze and improve website performance, and personalize user experience.
If you click “Accept All”, you allow the deployment of all these tools and collection of the information by us and the third parties for all these purposes.
If you click “Decline All” your IP address and other information may still be collected but only by tools (including third party tools) that are necessary to operate, secure and enable default website features and functionalities. Review and change your preferences by clicking the “Configurations” at any time.
Visit our Privacy Policy