-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cancel job whose object the script does not have access to #544
Comments
I was thinking about some solution like having |
I had that in mind, it really is the solution. We could save the ID in the database and cancel it whenever we want. |
You can access all registered jobs via |
You save my life 👯 |
This way worked for me. by passing the scheduled job to cancelJob function. const updateReports = schedule.scheduleJob("*/5 * * * * *", function() { function myFunc(arg) { |
Worked well here, I think the information about the So other people can save time trying to access the jobs that was already scheduled, what do you guys think? |
Let's say I ran this script to schedule a job:
Now, I write a new script to cancel the job above, which doesn't have access to the
j
that I created above, so I can't justj.cancel()
. Is there a way that I can cancel the job above?The text was updated successfully, but these errors were encountered: