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!
Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events