Configure cron-based scheduled workflows with the right cadence and timezone, fetch runtime data on each run, and set up monitoring so silent failures are caught immediately.
Choosing a Schedule Cadence
Before writing a single cron expression, decide how often your workflow genuinely needs to run. Running every minute is rarely necessary and burns through execution quota quickly. Most business workflows fall into one of four natural cadences: real-time (use a webhook instead), hourly aggregations, daily or nightly batch jobs, or weekly and monthly reports. Once you have chosen a cadence, navigate to the Schedule trigger panel in your workflow editor. Cotonity provides a visual builder for common patterns — every N minutes, daily at a time, weekly on specific days — so you do not need to memorise cron syntax for straightforward cases. For custom patterns, switch to the raw cron editor and enter the five-field expression directly.
Timezones and Daylight Saving
Always specify a timezone on your scheduled trigger. If you leave the field blank, Cotonity defaults to UTC, which means a workflow configured to run at 09:00 will fire at 09:00 UTC — potentially the middle of the night in your region. Pick the IANA timezone that matches the business logic of your schedule (for example, 'America/New_York' or 'Europe/London'). Cotonity automatically handles the spring-forward and fall-back transitions, so a workflow set to 09:00 America/New_York will always run at 09:00 local time regardless of whether daylight saving is in effect. If your workflow runs tasks that are sensitive to duplicate or skipped execution at DST boundaries, enable the 'Skip duplicates' option in the advanced settings panel.
Fetching Data at Runtime
Unlike webhook-triggered workflows that receive an input payload, scheduled workflows start with no external data. Their first step is almost always a 'Fetch' or 'Query' action that retrieves the data the rest of the workflow needs. For example, a nightly CRM sync workflow might start by calling the HubSpot Contacts API with a filter for records modified in the last 24 hours, then loop over the results to update your internal database. Design this first step carefully: scope your query to only the records relevant since the last run, rather than pulling your entire dataset each time. Cotonity's built-in date helpers make it easy to compute relative timestamps — for instance, 'now minus 24 hours' — that you can inject directly into API query parameters.
Monitoring and Alerting for Scheduled Jobs
A scheduled workflow that silently fails is worse than one that does not exist, because you may not notice the failure for days. Enable execution alerts on every scheduled workflow by opening the Monitoring tab in the workflow settings and checking 'Alert on failure'. Enter the email address or Slack channel where failure notifications should be delivered. You can also configure a 'missed execution' alert that fires if the workflow does not produce a successful run within a defined window — useful for catching scheduler outages. Review the execution history chart weekly; a sudden spike in duration often signals that the upstream data source has grown and your query needs an index or a pagination strategy.