Deno unveils new deature, Deno Cron, for simplified creation and scheduling of jobs
Deno, the next-generation JavaScript runtime, has unveiled a new feature, Deno Cron, designed to simplify the creation of scheduled jobs. The Deno.cron() function requires three parameters: 'name' to identify the scheduled job, 'schedule' to set the timing using the Unix cron format in UTC timezone, and 'handler', a function that's executed according to the provided schedule.
A key distinction of Deno Cron from traditional UNIX/Linux cron is its non-overlapping executions. If a task is scheduled to run every 10 minutes but takes 30 minutes to complete, Deno Cron will not initiate the next scheduled run until the current task is finished. This prevents the potential issues and complex logic associated with overlapping cron jobs.
Deno Deploy, Deno's serverless JavaScript platform, automatically detects and manages Deno.cron() operations, eliminating the need for any manual intervention.