ETLMCPData Conveyance Works
Log in Start free
Docs

When a pipeline runs: daily hour and time zone

A pipeline runs once a day, a few minutes after its hour in its own time zone. The first run is the next one, and missed days get no extra runs.

Your pipeline runs once a day. It becomes due when the clock in its own time zone reaches its hour, and etlmcp checks for due pipelines every 5 minutes, so the run is queued up to a few minutes after the hour, not exactly on it. A new pipeline runs at 6:00 UTC until you change its hour or time zone. Its first scheduled run is the next time that hour comes round, and days the schedule missed are not run afterwards.

Setting the hour and time zone

You change the schedule in the dashboard, on the pipeline's page, in the panel headed "Hours of Working", and then press Save. The public REST API and MCP read pipelines and start runs; they do not change the schedule.

  • Hour: a whole hour from 00:00 to 23:00. There is no minute setting.
  • Timezone: an IANA zone name such as America/New_York or Australia/Sydney. Any valid IANA name is accepted; a name that is not a zone is refused with timezone must be a valid IANA zone like Europe/London.

The dashboard shows the schedule as, for example, 07:00 Europe/Paris. A script reads the hour and timezone fields from Get a pipeline.

How etlmcp decides a run is due

On every check, a pipeline is due when all three hold:

  1. The pipeline is switched on: the "Run on schedule" box on its page.
  2. Today, as a date in the pipeline's time zone, has not had its scheduled run.
  3. The local hour is at or past the pipeline's hour.

etlmcp then records today as scheduled and queues one run. Because the test is "at or past", a late check still queues the run the same day: if the workers were busy or restarting at 07:00, the run is queued at the first check after that, as long as it is still the same local date.

The day is marked as scheduled before the run is queued, so a day can be lost but never run twice by the schedule. A failed run is tried again inside that same run, as Retries describes; it does not make the schedule queue a second run that day.

Daylight saving time

The rule compares the local hour, so clock changes do not break it. On the night the clocks go forward, an hour such as 02:00 does not exist in some zones; the pipeline becomes due at the first check after the jump, at 03:00 local time. On the night the clocks go back, an hour such as 01:00 happens twice; the pipeline runs during the first one, and the second finds the date already scheduled. Either way, the pipeline runs once that date, and a run set to 07:00 stays at 07:00 local time across the change.

The first run, and changing the hour

A pipeline's first scheduled run is the next time its hour comes round. A pipeline created at 10:00 UTC has already passed its default hour, so today counts as scheduled and the first run comes tomorrow. One created before that hour runs later the same day.

Changing the hour or the time zone follows the same rule. Moving the hour to one that has already passed today does not start a run now; the next run is tomorrow. Moving it to a later hour does not add a second run on a day that already had its scheduled run. If you need data today, start a run by hand instead: see Start a run or run_pipeline.

Missed days are not caught up

The schedule queues at most one run per local date and never goes back for dates it skipped. If the pipeline was switched off for three days, switching it back on does not queue three runs. It queues one: at the next check if today's hour has already passed and today has not been scheduled, otherwise at the hour.

The data can still be filled in. Each scheduled run pulls a trailing range of days ending on today's local date. If the last day your earlier syncs covered falls before that range begins, for example because the source needed reconnecting for a while, the run starts further back so the days in between are pulled too. The range never reaches past the history your plan keeps.

When a due pipeline does not run

The check only considers a pipeline when its source and its destination are switched on and the source is in good health. A source that needs reconnecting, or one that can no longer be read, is passed over until it is fixed; if you fix it later the same day, the pipeline runs at the next check.

If a sync for the pipeline is still queued or running when the hour comes, that day's scheduled run is skipped rather than queued behind it. If etlmcp cannot queue the run at all, the day is lost and the organization's owners are emailed about the failure. Those emails go out at most once per UTC day for each pipeline, and about no more than 20 pipelines of one organization a day.

Scheduled runs do not count toward the cap on runs started by hand, and that cap never holds them back.

Related