I know I could just store the script in a file from within the "Script Editor" section of ScriptRunner, and then just use that for a Post-Function and a Scheduled Job, but I was wondering if there is a way to execute a scheduled job once from inside a Post-Function (so via Workflow Button) directly, as if you would press the "Run now" button on the jobs page manually.
Basically in pseudo code:
ScheduledJobManager scheduledJobManager = ComponentAccessor.getScheduledJobManager()
ScheduledJob scheduledJob1 = scheduledJobManager.getJob("JobThatDoesSomething")
Thanks for your reply.
I know how to write post-functions, and I read the documentation.
What I'm looking for is a way to import a custom Scheduled Job (that I created and runs every day) into a custom Post-Function script, and execute it from there (as if I pressed "Run now" on the Scheduled Job's page).
Copy the script to the post function, modify as needed, and be done with it. I know this isn't the answer you want, but you're asking to do something that "isn't easily possible." It is possible through the Java API, like every function in the app, but you should asses how much effort you are willing to put in and the value of the output. Cheers!
Calling all collaborators and Confluence users! Our Appy Hours event on September 29th features 4 presenters demoing functionality to superpower Confluence. Don't miss learning about these apps i...