- EmDash
- Guides
- Schedules
Schedule a URL import
Fetch a feed on a timetable and import it with a saved template. Every scheduled run is logged and can be rolled back.
A schedule fetches a URL source and imports it with a saved template, on a timetable you set. When the feed hasn’t changed since the last import, the run imports nothing.
Before you start
Section titled “Before you start”- A saved template. Save one from the wizard’s Options step with Save as template, or see Templates.
- A URL source. If the feed needs a key, store it as a credential.
- On Cloudflare Workers, a Cron Trigger. See On Cloudflare Workers.
Only Administrators can create and change schedules. A site holds at most 20 schedules.
Create a schedule
Section titled “Create a schedule”- Open Imports in the admin sidebar, then the Schedules tab, and choose New schedule.
- Enter a Name, 1 to 100 characters.
- Pick the Template and the URL source.
- Under When it runs, choose Hourly, Daily, Weekly or Custom, and set the time. See When it runs.
- Under Imported entries, choose Publish them or Save them as drafts.
- Optionally set a Batch size: entries per batch, from 1 to 500. Left empty, it is 50. On Cloudflare Workers a smaller cap applies; see On Cloudflare Workers.
- If the template handles missing entries, choose what the schedule does about them. See Missing entries.
- Choose Create schedule.


A new schedule is active straight away. Before it saves, the importer checks that the template still fits the site: a template that maps to fields that no longer exist, for example, is refused with TEMPLATE_PROBLEMS.
To test a template on the feed before you schedule it, run it once in the wizard and look at the Preview step’s dry run.
When it runs
Section titled “When it runs”| Choice | You set | Cron it saves | Example |
|---|---|---|---|
| Hourly | Minute past the hour (0 to 59) | 15 * * * * |
Every hour at minute 15 |
| Daily | Time (UTC) | 0 6 * * * |
Every day at 06:00 UTC (the default) |
| Weekly | Day and Time (UTC) | 30 6 * * 1 |
Every Monday at 06:30 UTC |
| Custom | Cron expression (UTC) | as typed | */30 * * * *, every 30 minutes |
A custom expression has five fields: minute, hour, day of month, month and day of week. You can also use @hourly, @daily, @weekly, @monthly or @yearly. An expression that is not valid, or that names a date that never comes (such as 31 April), is refused with INVALID_CRON.
The When column shows the next run. On Node, a run starts within seconds of its time. On Cloudflare Workers, it starts at the next Cron Trigger.
Missing entries
Section titled “Missing entries”When the template handles entries missing from the feed, the dialog asks under Entries missing from the feed:
- As the template sets: move them to the trash or unpublish them, as the template says, with its threshold.
- Off: scheduled runs leave missing entries alone.
- A lower threshold: a stricter limit for scheduled runs. Stop when more than this percent is missing can be at most the template’s own threshold.
A schedule can lower the threshold, never raise it.
What a run does
Section titled “What a run does”At its time, a schedule fetches its source and creates an import job, which the importer runs in the background, batch by batch. The run’s import appears in the Jobs tab, marked Schedule, and can be rolled back like any other.
The Last run column says how the last launch went:
- Started an import.
- The feed had not changed, so nothing was imported. The fetched content and the template were the same as at the last import.
- Skipped: an import from this source was still running.
- Couldn’t start: followed by the reason.
Every import a schedule runs keeps a journal, so it can be rolled back.
Run now
Section titled “Run now”Run now queues a run straight away instead of waiting for the timetable. It follows the same rules: when the feed hasn’t changed, nothing is imported. Run now is only offered while the schedule is active, and is refused with SCHEDULE_BUSY while an import from that source is still running.
Run log
Section titled “Run log”Run log lists the schedule’s last 20 runs, newest first: when each one finished, its outcome (Completed, Failed, Cancelled, or stopped because the feed was empty or too many entries were missing), its record counts, and a link to the import. A run that was rolled back says Rolled back. Deleting a schedule deletes its run log; the imports it ran stay.
Active and paused
Section titled “Active and paused”The Active switch turns a schedule on and off. Switch it off to pause it yourself, and on again to resume it.
A schedule also pauses itself when something needs your attention, and the row says why:
| The row says “Paused” because… | What to do |
|---|---|
| its template was deleted | Edit the schedule and choose another template. |
| its template changed after it was scheduled | Switch it back on. It then runs the template’s current version. |
| its source was deleted | Edit the schedule and choose another source. |
| its source’s address or credential changed | Switch it back on. It then reads the source as it is now. |
| the person who turned it on can no longer import | Switch it back on yourself. See Who a schedule runs as. |
| its template no longer fits the site | Fix the template or the collection, then switch it back on. |
| its source’s credential no longer exists | Add the credential again, then switch it back on. |
| its source’s address cannot be fetched from the site | Fix the address, then switch it back on. |
| the feed was larger than the site accepts | Raise maxSourceBytes, or ask for a smaller feed. |
| the feed could not be fetched several times in a row | Three launches failed in a row. Check the source with Fetch now. |
| an import it ran failed | Look at the import in Jobs. |
| an import it ran was cancelled | Switch it back on when you’re ready. |
| an import it ran was rolled back | Switch it back on when the feed is right. |
| too many entries were missing from the feed | Check the feed. See Missing entries. |
| the feed was empty | Check the feed. A run that reads no record stops rather than treating every entry as missing. |
A schedule pins the template version and the source’s address and credential it was set up with, so a change to either never reaches a running timetable unnoticed. When you edit a template or a source in the admin, the dialog names the schedules that use it and offers to update them too. When an active schedule’s template has a newer version, its row says Will pause at its next run: its template changed. and offers Use the current version.
Who a schedule runs as
Section titled “Who a schedule runs as”A schedule runs on behalf of the Administrator who last turned it on: who created it, resumed it, or changed what it runs. Before each run, the importer checks that this person still exists and still has the import:execute permission. If not, the schedule pauses, and another Administrator can switch it back on to take it over. The entries a scheduled run writes aren’t attributed to this person, or to anyone. See Permissions.
During a site import
Section titled “During a site import”While EmDash imports a whole site (see EmDash’s site transfer guide), the Imports page shows A site import is running. and waits until it ends. Scheduled runs and their batches wait too. They also wait while the site is locked for an export, and while EmDash turns on media tracking. A banner on the Schedules tab says so.
A schedule doesn’t pause for this. A run that came due meanwhile starts once the site is free, and runs only once however many times it came due.
On Cloudflare Workers
Section titled “On Cloudflare Workers”Scheduled imports run on EmDash’s own scheduler. On Cloudflare that needs a Cron Trigger in wrangler.jsonc and EmDash’s scheduled handler in the Worker entry point, as the EmDash Cloudflare templates set up:
{ "name": "my-emdash-site", "triggers": { "crons": ["* * * * *"] }}To check the wiring, run npx emdash doctor. See EmDash’s Cloudflare deployment guide for the entry point and for triggers other than every minute.
On Workers the importer takes one step per Cron Trigger run, to stay within Cloudflare’s limits: it starts a run, or imports one small batch of at most 6 records (3 when the template maps taxonomies, references, bylines, translations or media). With the every-minute trigger, a feed of 600 records takes about 100 minutes. The schedule’s batch size can’t raise this cap. An import you run from the wizard isn’t affected.