How to schedule a script in BPS for Jira

Visitas: 29

In this tutorial, we will look at scheduling scripts.

They can be used when you want to perform operations that happen regularly, at specific intervals of time.

As an example, in this tutorial we will query your services to find out if new information has been added. This can be set up in a way that will trigger the creation of specific type of JIRAs or with specific information based on your needs.

To add the required scheduling script, in the Property Inspector in the right of the screen, select the ‘Schedule’ ellipses.

In the pop up select the frequency that you want to run your script.

There is a choice between ‘Daily’, ‘Days per week’, ‘Days per month’ and ‘Advanced’.

Within the first interval, there are choices for ‘Daily’.

The time of the day can also be specified.

There are choices for ‘Days per week’.

Or ‘Days per month’.

A more powerful option in set up is the Advanced option as it allows you to specify a cron expression.

In this example is once every minute of every day.

Then click “save”.

Once the choices have been made regarding the timings of the scheduling and after saving the query, we can enable this script.

In the Property Inspector, click the Enabled checkbox.

By enabling the script, this query will run at every minute of every day.

To see the output of the script, click in the tools at the bottom of the window and choose the Execution tab.

For this example, it is useful to enable the auto-refresh option.

Using the auto-refresh it will display the output as soon as there is fresh information.

After a minute has passed and the scheduled script has run, we can see a new script created with the timestamp. If we would like to see the output of that execution, just expand the node.

As our script has been scheduled to be run every minute, we can see a new log appearing a minute later.

Thank you for following this tutorial, we hope you find this function very useful in your projects.

CAPTCHA
Esta pregunta es para comprobar si usted es un visitante humano y prevenir envíos de spam automatizado.