Availability
This routine is available starting with Power Scripts™ for Jira 3.0.8.
This routine is available for Jira server and cloud deployment options.
Starting with version 4.8.0.10 of Power Scripts an optional param will be available that will give the possibility to assume an user when executing the script.
Syntax
runJobAt(silFile, args, date [,user])
Description:
Runs a job at the specified date.Parameters
Parameter name | Type | Required | Description |
---|---|---|---|
silFile | string | Yes | The sil file name. |
args | array string | Yes | The list of the arguments of the job. |
date | date | Yes | The date-time you wish the job to run. Must be in the future |
user | string | No | The user which will be used to run the script. |
Return type
none
The returned value has no meaning.
Example
date varDate = "2015-08-20T18:30:55"; runJobAt("script.sil", {project, key}, varDate);
The example above will create a job that will run the sil script at the date specified.
In "script.sil" you can access the args using the next syntax:
string issueKey = argv[1];
No 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.
It is highly recommended to provide a user to the scheduled job when interacting with Jira tickets.
Starting with version 4.8.0.10 of Power Scripts an optional param will be available that will give the possibility to assume an user when executing the script.
See also