Buy

Scheduled tasks

Free & Premium

The Scheduled tasks page is a front end for cron on your Mac: you run any command on a schedule without keeping a terminal open or editing your crontab. Typical cases are php artisan schedule:run, a queue worker, an npm run build or a regular database export. Every task shows its last result and its output.

What you do here

Page layout

Area Content
Header New task, on Free with the counter “x / 3 free” next to it.
Note Run without the app open The state of macOS scheduling, with Set up and Settings.
Tasks One card per task with name, schedule, last result, command and last output.

If there is no task yet, it says “No scheduled tasks yet. Create one to run a command on a schedule.” with New task.

On the command line you manage the same tasks with wd cron: list, run, enable, disable, add, edit and delete. More under Tasks, backups and logs.

Tasks on your servers have a page of their own: Remote › Cron jobs.

Free and Premium

On Free you create up to three tasks, with the full feature set. The counter “x / 3 free” is at the top. Premium lifts the limit.

The limit blocks creating a fourth task. If you try, Free limit reached appears. If you later go back from Premium to Free, nothing is deleted: the three oldest tasks keep running, all others are locked until Premium is active again. Locked tasks do not run, Run now and Pause are disabled, and when editing only the name can be changed. Deleting still works.

Scheduling without the app open is included in Free.

Create a task Free & Premium

New task creates a command with a schedule. The command runs with your permissions through the shell, in a folder of your choice, and finds php, node and WebDonkey's other tools without a full path.

Where to find it

Sidebar Local › Scheduled tasks, New task at the top right. On the command line, wd cron add "<name>" --schedule "*/15 * * * *" --command "<command>" creates a task, optionally with --dir and --paused.

How to do it

  1. Click New task.
  2. Name: for example “Laravel scheduler”.
  3. Command: for example php artisan schedule:run. It runs through the shell, so pipes, && and environment variables work.
  4. Working directory (optional): the folder the command starts in. Type the path or use Choose. Without one, it is your home folder.
  5. Schedule (cron expression): the default is */15 * * * *, every 15 minutes. Type your own expression or click a preset (see The schedule).
  6. Enabled (run on schedule): ticked. If you untick it, the task only runs when you click Run now.
  7. Click Save. The button only becomes active once name, command and a valid schedule are there.

With Enabled on, the dialog reminds you: “Scheduled runs need WebDonkey to be running. Anything missed while it was closed is caught up the next time you open it.” How to change that is described under Run without the app open.

php, node and other tools

A plain tool name like php, node or composer means the version you chose in WebDonkey, the same one as in WebDonkey's terminal. A command needs no path like /opt/homebrew/bin/php.

  • If the working directory lies in a site's project folder, php uses that site's PHP version and its php.ini. With nested sites, the innermost one wins.
  • If you deliberately want another version, give the full path to the binary.
  • PHP reads WebDonkey's php.ini including the shared php.ini, not Homebrew's.

Edit and delete

  • The pencil on the card (Edit) opens Edit task with the same fields. If you switch pages in between, your draft stays. Closing the dialog discards it.
  • The trash can (Delete) asks Delete task?. The task is then gone entirely.
  • For a locked task (after the switch to Free) only the name can be changed. The dialog says: “Only the name can be changed. The task does not run until Premium is active again.”

Troubleshooting

What you see Why What to do
Free limit reached On Free there are at most three tasks. Delete a task or activate Premium.
“Not a valid cron expression.” The schedule is not a valid five-field expression. Check the expression or use a preset.
Result Exit 127 The command was not found. Check the spelling or give the full path.
The command cannot find its files It starts in your home folder. Fill in the Working directory.

See also

The schedule Free & Premium

When a task runs is set by a cron expression, just like in a crontab. For the common cases there are presets to click. The same syntax applies to the schedule of a backup set.

Where to find it

Sidebar Local › Scheduled tasks, New task or the pencil on a card, then the Schedule (cron expression) field.

How an expression is built

An expression has five fields separated by spaces:

minute hour day-of-month month day-of-week

Field Values
Minute 0 to 59
Hour 0 to 23
Day of month 1 to 31, or L for the last day of the month
Month 1 to 12 or JAN to DEC
Day of week 0 to 7 or SUN to SAT. 0 and 7 are Sunday, 1 is Monday.

Every field accepts * (any value), single numbers, ranges (1-5), lists (1,15) and steps (*/15, 8-18/2). Names may be upper or lower case. If day of month and day of week are both restricted, it is enough for one of them to match, as in cron.

Examples

Expression When
*/15 * * * * every 15 minutes
0 * * * * every full hour
0 3 * * * daily at 03:00
0 9 * * 1-5 weekdays at 09:00
0 3 * * 1 every Monday at 03:00
30 2 1 * * on the first of every month at 02:30
0 23 L * * on the last day of every month at 23:00

Presets

Instead of typing, click a preset below the field:

Preset Expression
Every minute * * * * *
Every 15 minutes */15 * * * *
Hourly 0 * * * *
Daily at 03:00 0 3 * * *
Weekdays at 09:00 0 9 * * 1-5
Mondays at 03:00 0 3 * * 1

The matching preset is highlighted. If your expression matches a preset, its name appears below the field, otherwise the explanation “Five fields: minute hour day-of-month month day-of-week.”

Validation

WebDonkey checks the expression as you type. If it is invalid, “Not a valid cron expression.” appears below the field, and Save stays off. So no task can come into being that never runs.

Good to know

  • All times are your local time.
  • When the clocks go forward in spring, a time that does not exist (such as 02:30) runs at the first minute after it. A time that occurs twice in autumn runs only the first time.
  • If the Mac or the app was off when a task was due, WebDonkey catches up on the next start.
  • If the task should also run without the app open, not every expression fits. Every minute (* in the minute field), L and very finely split schedules stay with the app, see Run without the app open.

See also

Run tasks and read results Free & Premium

Every task is a card on the Scheduled tasks page. It shows the schedule, the result of the last run and the command's output. From here you start a task right away, pause it or resume it.

Where to find it

Sidebar Local › Scheduled tasks. On the command line, wd cron list shows all tasks with schedule, last and next run, and wd cron run runs one and prints its output. More in Tasks, backups and logs.

The card

Element Meaning
Name The task's name.
Schedule The cron expression as a label, such as */15 * * * *.
Paused The task does not run on its schedule.
OK (green) The last run ended successfully (exit code 0).
Exit n (red) The last run ended with this exit code. The output below usually tells you why.
Command The command that runs.
Output What the command printed in its last run, standard output and error output together, at most 64 KB.

A locked task (after the switch to Free) is dimmed and carries a note that it is over the Free limit and Premium unlocks it.

Actions

Button What it does
Run now Starts the task right away, regardless of the schedule. While it runs, it says Running….
Power icon (Pause or Resume) Switches the schedule off and on again without deleting the task.
Pencil (Edit) Opens Edit task, see Create a task.
Trash can (Delete) Asks Delete task? and deletes it.

A task never runs twice at once, whether the app, the background service or a click started it. If it is already running, WebDonkey says this task is already running and does not start a second run.

Tracing what happened

  • Every run, scheduled ones included, appears in the WebDonkey journal with exit code, duration and trigger. There you also see when a task did not run at the planned time because the Mac was off.
  • A scheduled run reports its result in the bell: a check mark on success, otherwise the exit code with the first line of the output. Turn this off under Notifications at Scheduled task ran. A run with Run now does not notify you, you see its result on the card.

Good to know

Scheduled runs need WebDonkey to be running. Whatever was missed while the app was closed is caught up the next time you open it. How tasks run with the app closed is described under Run without the app open.

See also

Run without the app open Free

Scheduled tasks and scheduled backups normally run inside WebDonkey itself. If the app is closed, nothing happens at the planned time. WebDonkey catches up on the next start, so nothing is lost, it just happens later. For a nightly backup that is too late. So you can hand the timing over to macOS: tasks and backups then start with the app closed and even when nobody is logged in.

Where to find it

  • On the Scheduled tasks and Backups pages, the note Run without the app open at the top.
  • In Settings › System, the section Run on schedule without the app. The Settings button in the note takes you straight there.

How to set it up

  1. Click Set up in the note or in Settings.
  2. macOS asks once for your administrator password. While WebDonkey sets things up, it says Setting up….
  3. The note then shows Set up and below it how many of your schedules run without the app, for example “3 of 4 run without the app”.
  4. If projects live in Documents, Desktop, iCloud Drive or on an external drive, give the WebDonkey runner access in the macOS System Settings under Privacy & Security › Full Disk Access. No app can do that for you.

Once everything is set up, hide the note on its page with the × (Hide this note). It comes back by itself when something is no longer right.

The states

State Meaning What to do
Not set up Tasks and backups only run with the app open. Set up if you need it.
Set up macOS starts your schedules itself. nothing
Update needed WebDonkey was updated since setup, the entries still use the old version. Set up once more, which replaces them with a single password prompt.
Permission missing The permission is gone, for example because it was removed in the system. Set up once more.

In Settings

Under Settings › System, section Run on schedule without the app:

Button What it does
Set up Sets up scheduling, see above.
Rebuild entries Writes the entries of all tasks and sets anew, for example when a schedule does not run as expected.
Turn off Removes all entries from macOS. Schedules then only run with the app open again.
Remove Only appears when a helper with administrator rights from an earlier version is still installed and no longer needed.

Two things first

  • Your user account: these runs use your account, with exactly your permissions. Files they create belong to you.
  • Full Disk Access: for Documents, Desktop, iCloud Drive or external drives, the WebDonkey runner needs “Full Disk Access” once in System Settings.

Which schedules macOS takes over

macOS only takes over a schedule that fits into at most 96 calendar entries. WebDonkey needs one entry for every combination of the values you list in minute, hour, day, month and day of week. A field with * counts once. A * in the minute field, meaning every minute, is never handed to macOS.

Schedule Entries Without the app?
*/15 * * * * (every 15 minutes) 4 yes
*/15 * * * 1-5 (every 15 minutes, weekdays) 20 yes
0 * * * 1-5 (hourly on weekdays) 5 yes
0 3 * * * (daily at 03:00) 1 yes
* * * * * (every minute) no, * in the minute field
0 23 L * * (on the last day of the month) no, L
*/10 8-18 * * 1-5 (every 10 minutes from 8 to 18 on weekdays) 330 no, over 96

What does not fit stays with the app and runs as soon as you open it. The limit keeps macOS from waking your Mac all the time. If not everything is covered, a sentence in Settings explains it, and the count “x of y run without the app” shows how many.

What happens in the background

  • For every task and every scheduled backup set, WebDonkey creates a system entry of its own (a LaunchDaemon) under /Library/LaunchDaemons. At the planned time macOS starts the WebDonkey runner, which reads the task from WebDonkey's database and runs it.
  • When you change a task or a set, WebDonkey updates its entry.
  • A task never runs twice: if it is already running because the app started it, the runner does not start a second run, and the other way round.
  • What the runner does appears in the WebDonkey journal with Written by Background service. If something goes wrong there, WebDonkey reports it in the bell: within a minute while the app is open, otherwise the next time you open it.
  • A backup with the app closed backs up the files. Databases whose server is not running then are left out and named, see Schedule, storage location and retention.

See also

Cookie preferences

This website uses cookies to ensure the best experience possible. Your choice applies to webdonkey.io and the shop at shop.webdonkey.io. More information...

Technically required

Cookies required for this website to function:

Always on
WebDonkey
WebDonkey
Provider: BuI Hinsche GmbH, Neumarkt 7, 06712 Zeitz, Germany
Purpose: Your consent, colour scheme and language for website and shop, price switches; with wd_debug in the address, the measurement events in the developer console for troubleshooting
Cookies and storage: Cookie wd_consent on .webdonkey.io, shared with shop.webdonkey.io (12 months); cookies wd_theme and wd_lang on .webdonkey.io, shared with shop.webdonkey.io, only when you switch colour scheme or language yourself (365 days); localStorage wd:consent, wd:theme, wd:lang; sessionStorage wd:acc, wd:term, wd:debug (only with wd_debug in the address; until the tab closes)

Statistics

Shows us which pages and products people look at on webdonkey.io and in the shop, where visitors come from and how they get to a purchase (with order number, amount and products, without name or email address). Provider: Google. Transfer to the USA possible (EU-US Data Privacy Framework). Your choice applies to webdonkey.io and the shop together.

Google Tag Manager, Google Analytics 4
Google Tag Manager
Provider: Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Ireland
Purpose: Loads the services you agreed to, here and in the shop. Sets no cookies of its own.
Cookies and storage: none
Privacy policy
Google Analytics 4
Provider: Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Ireland
Purpose: Usage statistics: page views, clicks, scroll depth, sources, devices, load times; in the shop also basket, checkout, purchases, registration and sign-in
Cookies and storage: _ga, _ga_<ID> (2 years)
Privacy policy

Marketing

Measures whether our ads on Facebook, Instagram and TikTok lead to visits and downloads on webdonkey.io and to registrations and purchases in the shop, and builds audiences for ads. Providers: Meta and TikTok, with whom we are jointly responsible for this. With this consent Google may also set advertising cookies (_gcl_…). Transfer to the USA and other countries outside the EU possible. Your choice applies to webdonkey.io and the shop together.

Google Tag Manager, Meta Pixel (Facebook, Instagram), TikTok Pixel
Google Tag Manager
Provider: Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Ireland
Purpose: Loads the services you agreed to, here and in the shop. Sets no cookies of its own.
Cookies and storage: none
Privacy policy
Meta Pixel (Facebook, Instagram)
Provider: Meta Platforms Ireland Limited, Merrion Road, Dublin 4, D04 X2K5, Ireland
Purpose: Ad measurement and target groups on Facebook and Instagram, also in the shop (basket, checkout, purchases, registration)
Cookies and storage: _fbp (3 months), _fbc (3 months, only if you arrive through an ad), fr on facebook.com (3 months)
Privacy policy
TikTok Pixel
Provider: TikTok Technology Limited, 10 Earlsfort Terrace, Dublin, D02 T380, Ireland
Purpose: Ad measurement and target groups on TikTok, also in the shop (basket, checkout, purchases, registration)
Cookies and storage: _ttp, _tt_enable_cookie (13 months)
Privacy policy