Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleAvailability

This routine is available starting with Power Scripts™ for Jira 3.0.8.

This routine is available for Jira server and cloud deployment options.

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

runJobInAndRepeat(silFile, args,

...

interval)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
Runs a job every specified interval.

Runs a job every specified interval.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

scriptPath

...

String

Yes

The source of the script to be executed.

args

array string

Yes

The list of the arguments of the job.

interval

int

Yes

The interval

...

Info
titleAvailability

This param is available starting with version 4.8.0.10 of Power Scripts .

Return type

...

Return Type

None

The returned value has no meaning.

Example

This example creates a job that runs the script "script.sil" every 30 minutes. The job running will repeat every 30 minutes.

Code Block
string[] args = {key, project};
interval varInterval = "30m";
runJobInAndRepeat("script.sil", args, varInterval);

The example above creates a job that runs the script "script.sil" every 30 minutes. The job running will repeat every 30 minutes.

...

For the scriptPath parameter you can either give the relative path (as in the example above), or the absolute path:  
C:/Program Files/Atlassian/Application Data/JIRA/silprograms/script.sil.

In "script.sil" you can access the args using the next syntax:

Code Block

...

<ac:structured-macro ac:name="code" ac:schema-version="1"><ac:plain-text-body>string issueKey = argv[0];

...

titleNo user provided

This routine doesn't assume any user when executed because of the nature of this action(the execution of the script can be scheduled at any point in time and that cannot guarantee the user is authenticated). Therefore, the script will NOT have the required permissions to interact with Jira tickets, unless the project allows for anonymous access or the script explicitly calls out the user to use within in the script using the runAs routine.

...

</ac:plain-text-body></ac:structured-macro>

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "schedulerschedule_routines"routine" and space = currentSpace ( )
labelsschedulerarray_routines