Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are a few ways to resolve the issue of SyncedCron running twice due to time zone synchronization in Meteor/Saucecode:

  1. Change the cron interval to a smaller value, so that the window of time during which the cron job can run is minimized.

  2. Set the timezone explicitly in the code, rather than relying on the automatic detection of the server's timezone.

  3. Use a third-party package, such as meteor-synced-cron-timezone or cron-tz, that provides more fine-grained control over the timezone used by the cron job.

  4. Use a different package or tool for scheduling tasks that does not rely on SyncedCron, such as node-cron or Agenda.

Ultimately, the best approach depends on the specific requirements and constraints of the project.