Apply Hierarchy by Schedule

Since we understand that our customers are busy people, we developed a new feature for the Smart Issue Templates that will reduce the time you have to spend on Jira Issues. Now, you can apply an entire Hierarchy of the repeated issues on a preconfigured schedule.

Create Hierarchy Scheduler

  1. Select a Hierarchy you want to add a scheduler to on the ‘Manage Hierarchies’ page

  2. Click on the Hierarchy Name in the ‘Name’ column

image-20240919-121356.png
  1. Click the ‘Add Scheduler’ button on the Hierarchy View page.

image-20240919-121443.png
  1. The ‘Add Scheduler’ dialog is opened

  2. Set the configurations for the time of applying your hierarchy

  1. Select the timezone you want your issues to be applied by (in another case the UTC+0 will be used)

  2. Click the ‘Add' button

  3. Your scheduler is created!

Set the timezone for the Smart Issue Templates scheduler

Once, the CRON schedule applies issues for UTC+0 time zone it is important to convert time for applying hierarchy according to your team's current timezone.

However, we added the ability to select a specific time zone which will be used for setting and applying the Smart Issue Templates scheduler for each scheduler:

Now you can select the time for executing the scheduler according to your UTC time zone. The time will be converted automatically and the hierarchy will be applied in time.

Manage Schedules

All available hierarchy schedulers are placed in the hierarchy details. You can see the information about schedulers:

  • Name - scheduler name

  • Scheduler (CRON) - periodicity of scheduler execution on selected instance timezone

  • Execute Once - shows if the scheduler will be disabled after the first execute

  • Is Active - switch this toggle to temporary disable/enable your scheduler without deleting it

  • Last Execute - time of the last scheduler execute on your timezone

  • Next Execute - time of the next scheduler execute on your timezone

  • Total executes - number of the total executes for the current scheduler

  • Edit - click to change scheduler settings (can be not shown if the ‘Edit Scheduler’ permission is not granted)

  • Delete - click to delete permanently scheduler settings (can be not shown if the ‘Delete Scheduler’ permission is not granted)

Scheduler permissions

The Scheduler permissions are integrated into other Smart issue Templates permissions.

In this case, John Doe can create schedulers, but he will be able to edit and delete only the ones, he is the creator of.

However, members of the site-admins group can manage all schedulers, regardless of who is the scheduler owners.

Construct CRON expressions for a Scheduler

This article is adoption of Atlassian’s article on how to construct cron expressions for a filter subscription. We borrowed it because this is the best explanation of what CRON is and how to use it. We didn’t provide a link to the original article in our application because some of the contents of the original article differ from what we have in our application.

A CRON expression gives you more control over the frequency, compared to the default schedules. For example, you could define a CRON expression to notify you at 10:30 am (on UTC chosen) on the last Friday of June, September, and December.

Constructing a CRON expression

A CRON expression is a string of fields separated by spaces. The following table displays the fields of a CRON expression in the 'Add Scheduler' dialog, in the order that they must be specified (from left to right):

 

Minute

Hour

Day (month)

Month

Day (week)

Allowed values

0-59

0-23

1-31

1-12 or JAN-DEC

0-6 or SUN-SAT

Allowed special

characters 

, - * /

, - * /

, - * / ? L W C

, - * /

, - * / ? L C #

*note, CRON expressions are not case-sensitive.

Special characters

Special character

Usage

,

Specifies a list of values. For example, in the Day (week) field, 'MON,WED,FRI' means 'every Monday, Wednesday, and Friday'.

-

Specifies a range of values. For example, in the Day (week) field, 'MON-FRI' means 'every Monday, Tuesday, Wednesday, Thursday and Friday'.

*

Specifies all possible values. For example, in the Hour field, '*' means 'every hour of the day'.

/

Specifies increments to the given value. For example, in the Minute field, '0/15' means 'every 15 minutes during the hour, starting at minute zero'.

?

Specifies no particular value. This is useful when you need to specify a value for one of the two fields Day (month) or Day (week), but not the other.

L

Specifies the last possible value; this has different meanings depending on context. In the Day (week) field, 'L' on its own means 'the last day of every week' (i.e. 'every Saturday'), or if used after another value, means 'the last xxx day of the month' (e.g. 'SATL' and '7L' both mean 'the last Saturday of the month). In the Day (month) field, 'L' on its own means 'the last day of the month', or 'LW' means 'the last weekday of the month'.

W

Specifies the weekday (Monday-Friday) nearest the given day of the month. For example, '1W' means 'the nearest weekday to the 1st of the month' (note that if the 1st is a Saturday, the email will be sent on the nearest weekday within the same month, i.e. on Monday 3rd). 'W' can only be used when the day-of-month is a single day, not a range or list of days.

#

Specifies the nth occurrence of a given day of the week. For example, 'TUES#2' (or '3#2') means 'the second Tuesday of the month'.

Examples

15 20 ? * *

Every day at 8:15 pm.

15 8 * * ?

Every day at 8:15 am.

  • 14 * * ?

Every minute starting at 2:00 pm and ending at 2:59 pm, every day.

0/5 14 * * ?

Every 5 minutes starting at 2:00 pm and ending at 2:55 pm, every day.

0/5 14,18 * * ?

Every 5 minutes starting at 2:00 pm and ending at 2:55 pm, AND every 5 minutes starting at 6:00 pm and ending at 6:55 pm, every day.

0-5 14 * * ?

Every minute starting at 2:00 pm and ending at 2:05 pm, every day.

0/10 * * * ?

Every 10 minutes, forever.

10,44 14 ? 3 WED

2:10 pm and 2:44 pm every Wednesday in the month of March.

15 8 ? * MON-FRI

8:15 am every Monday, Tuesday, Wednesday, Thursday, and Friday.

15 8 15 * ?

8:15 am on the 15th day of every month.

15 8 L * ?

8:15 am on the last day of every month.

15 8 LW * ?

8:15 am on the last weekday of every month.

15 8 ? * 6L

8:15 am on the last Friday of every month.

15 8 ? * 6#2

8:15 am on the second Friday of every month.