Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:adm:create_and_configure_trigger [2019/07/10 07:00]
doischert
tutorial:adm:create_and_configure_trigger [2020/05/13 14:42]
apeterova [Cron trigger]
Line 5: Line 5:
 {{ :tutorial:adm:scheduled_tasks_trigger_01.png |}} {{ :tutorial:adm:scheduled_tasks_trigger_01.png |}}
  
-So we have three scheduled tasks, none of them has any trigger. Let´s start with the first scheduled task (by description). Click on the **Add** button in **Scheduled starts** and a pop-up window will show up.+So we have three scheduled tasks, none of them has any trigger. Let´s start with the first scheduled task (by description). Click on the **Add** button in **Scheduled starts** and a pop-up window will show up.  
 + 
 +We have four types of triggers: 
 +  * Once time start trigger - task starts once in configured date and time. 
 +  * Repeated start trigger - configure period to repeated task start. Configured period is converted to cron expression on the background. 
 +  * Cron trigger - cron expression can be configured directly. 
 +  * Other task trigger - task is started after other (dependent) task ends. 
 + 
 +==== Once time start trigger ====
  
 {{ :tutorial:adm:scheduled_tasks_trigger_02.png |}} {{ :tutorial:adm:scheduled_tasks_trigger_02.png |}}
Line 16: Line 24:
 Now click the **Add** trigger button next to **the second scheduled task**. Now click the **Add** trigger button next to **the second scheduled task**.
  
-{{ :tutorial:adm:scheduled_tasks_trigger_04.png |}}+==== Repeated start trigger ====
  
-Now select the trigger type **Cron**. In **Cron expression** field you can add an expression which could start the scheduled task periodically. We set **0 0 7 * * ?**, meaning the scheduled task will be started every day at 7 AM. +{{ :tutorial:adm:repeated-trigger.png |}} 
-Cron expression tutorial: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html )+ 
 + 
 +Now select the trigger type **Repeated start**. We can choose interval from prepared options which could start the scheduled task periodically from given valid date. 
 +Configured period is converted to cron expression on the background. Behavior is the same as cron trigger, which is described below. 
 + 
 + 
 +==== Cron trigger ==== 
 + 
 +{{ :tutorial:adm:cron-trigger.png |}} 
 + 
 +Now select the trigger type **Cron**. In **Cron expression** field you can add an expression which could start the scheduled task periodically. We set **0 0 7 * * ?**, meaning the scheduled task will be started every day at 7 AM. When valid date is configured, then first start of the task will be postponed to given date. 
 + 
 +Cron expression tutorial: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html
  
 Other common combinations: Other common combinations:
   * **0 0 * * * ?** - start the task every hour   * **0 0 * * * ?** - start the task every hour
 +  * **0 0 7 * * ?** - start the task every day at 7 AM
 +  * **0 0 5 ? * MON** - start the task every monday at 5 AM
 +  * **0 0 11/12 * * ?** - start the task twice every day - at 11 AM and at 11 PM
  
 {{ :tutorial:adm:scheduled_tasks_trigger_05.png |}} {{ :tutorial:adm:scheduled_tasks_trigger_05.png |}}
  
 In the picture above, we can see another trigger and the next scheduled start is tomorrow on 31st January at 7 AM. This trigger will not disappear after that date, but will be updated to another start. In the picture above, we can see another trigger and the next scheduled start is tomorrow on 31st January at 7 AM. This trigger will not disappear after that date, but will be updated to another start.
 +
 +==== Other task trigger ====
  
 {{ :tutorial:adm:scheduled_tasks_trigger_06.png |}} {{ :tutorial:adm:scheduled_tasks_trigger_06.png |}}
  • by apeterova