Create Jobs Scheduler in Sitecore – Schedules

In the previous post, we configured a custom task that needs to be executed. In this post, we will define how often this task will be executed and outline the steps for this configuration.

The first step is to create a new schedule using the template from the path: /sitecore/templates/System/Tasks/Scheduler

I created new schedule named Email Alert Campaign Schedule.

Now, I’ll explain each of these parameters to make it clearer for those of you who are configuring this.

Command Field: Choose or specify the command path (created in the previous post).

Schedule Field: Indicate the desired frequency for the job to run.

Items Field: This is where you can define the Sitecore items array if needed in your class method.

Last Run: Reflects the timestamp of the last execution.

In the “Schedule” field, you will find several pipe-separated (|) values.

20220816|99990101|127|3:00:00

Start Date: 2022-08-16

End Date: 9999-01-01

Weekday Calculation: Calculated according to the weekday values:

  • Sunday = 1
  • Monday = 2
  • Tuesday = 4
  • Wednesday = 8
  • Thursday = 16
  • Friday = 32
  • Saturday = 64

For example, to run the job every day, the calculation is : (Sunday + Monday + Tuesday + Wednesday + Thursday + Friday + Saturday) = (1 + 2 + 4 + 8 + 16 + 32 + 64) = 127

Run Interval : In HH:MM:SS format = 3 hours

That’s all, folks! I hope I’ve been of help.

Deixe um comentário

Trending