Meteor Synced Cron

screenshot of Meteor Synced Cron

A simple cron system for Meteor. It supports syncronizing jobs between multiple processes.

Overview

If you're looking for a reliable cron system for your Meteor applications, Synced Cron might just be the solution you need. It simplifies the way jobs are scheduled and executed across multiple app servers, ensuring that only one server runs any given job at a time. This feature becomes particularly useful in deployments with several instances, as it prevents the same job from being executed multiple times concurrently. Following its migration from the original percolate:synced-cron, this updated package continues to thrive under community maintenance, bringing in necessary updates while maintaining its efficacy.

With its use of the powerful later.js library, Synced Cron provides a flexible scheduling system, allowing developers to create cron jobs with minute granularity. Whether you need recurring tasks or one-off events, this package handles it all with ease. Overall, if you are developing applications that require scheduled tasks, Synced Cron offers a robust and efficient solution.

Features

  • Single Execution Across Servers: Only one app server will run each scheduled job, preventing duplicate executions in a multi-server environment.

  • Robust Scheduling Flexibility: Utilizes the later.js library to provide extensive options for scheduling, allowing for customized job intervals.

  • Logging Capabilities: SyncedCron maintains a cronHistory collection that logs job executions, making it easy to keep track of when jobs ran and their outcomes.

  • Job Management Functions: Easily manage jobs with functions like nextScheduledAtDate, remove, and stop, providing control over job scheduling and execution.

  • Configuration Options: Adjust the default settings using the config method, allowing for tailored configurations that fit your application's needs.

  • Custom Logging Support: Integrate your own logging system with minimal effort, facilitating better tracking and analysis of job executions.

  • Flexible One-Off Scheduling: Create jobs that run just once, providing more control over specific events without needing to set a recurring schedule.