Testing Deno cron locally?
Is there a way to test Deno cron jobs without pushing the Deno deploy? Like using the development server or something?
3 Replies
I wasn't able to find the answer to your question in the official Deno documentation. However, if you're looking to test cron jobs locally, you might consider simulating the cron job execution manually. You can do this by invoking the function or code that would be triggered by the cron job directly within your local development environment.
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. For testing cron jobs, you might typically use a scheduler or set up a local environment that mimics the production environment as closely as possible. Remember to ensure that any external dependencies or environment-specific configurations are also replicated locally to get an accurate test result.
🦕💚 I'm glad I was able to help!
This is what I'm doing currently, it would just be good if you could run something like
deno cron now
and have it run your cron jobs as though they were on a deployed server.