graphql-engine
graphql-engine copied to clipboard
Add a 'run now' option to Cron Triggers
In order to test development of Cronjobs it would be beneficial to run them when the supporting code has been updated to reflect a change. For now you have to set the Cron Trigger to once a minute in Hasura. This becomes a nuisance to wait and test your new implementation.
I propose an option which runs the Cron Trigger immediately, such as a 'Run now' button which bypasses the chosen Cron Schedule.
An alternative solution which might require less work on Hasura's side would be adding the possibility to be running multiple Cron Triggers (2-6) concurrently all at a one minute interval where the startdate differs in seconds, so that every 10/15/20/30 seconds the Cron Trigger is ran. Currently doing this will just trigger all Cron Triggers at the same second, every minute.
My alternative option for now has been a One-off Scheduled Events with a timestamp in ISO8601 format which is set to a few seconds after the current time. The proposed solution has a deprecated piece of documentation linked, a more robust solution should be in order.
Thanks for the enhancement request but we do not have a timeline for this at the moment. Please continue to follow this Github issue for further updates.
I'd also love this. It seems like the functionality already exists on a schedule. A "Run now" button should be pretty simple as it would just trigger the same flow as the schedule, but immediately.