Can we stop a cron job?
I'm building a GraphQL service in Deno, and was thinking to use cron jobs as a means of keeping vector embeddings up to date, as it's simpler than trying to figure out how to update an embedding from a database trigger.
So I have created a simple hello world cron task and it launches fine with my service.
However, if the database schema is changed, my service "hot reloads", which also attempts to reinitialise the cron aspect, but cron complains that my task is already running.
It would be great to have a way to stop tasks.
Deno.cron might return a task ID, which we can then use to stop/kill that task.
Any thoughts?
Merry Xmas to all.
0 Replies