Repository navigation
Release 33.15
What's new
Rerunning cronitor sync
Sync is now safe and quiet to run again on a crontab it already set up (#90). This applies to Linux and macOS.
- Sync asks only about jobs that are not monitored yet. To be asked about every job, for example to rename one, run
cronitor sync --with-monitored.--autoignores that flag. - Plain
cronitor syncis the normal way to rerun. It checks every monitored job against Cronitor and picks up schedule and timezone changes without asking about the job. - For a job that is already monitored, sync sends only what changed: the schedule, the timezone, and the alert list when you pass
--notification-list. Without that flag, existing alert lists are kept and new monitors get Cronitor's default. Before, every sync replaced tags set in Cronitor withcron-joband reset alert lists todefault. - A changed
CRON_TZorTZline now updates the monitor's timezone even when the schedule stays the same. Before, sync missed it. cronitor sync --autoasks nothing: it monitors every new job, sends schedule and timezone changes, and writes the crontab. When you pass a single crontab file, it prints that crontab to stdout even if nothing changed (and on--dry-run), socronitor sync --auto file | crontab -never installs an empty crontab. If the shell wrapper cannot be installed or the crontab cannot be saved, it prints the original crontab and exits 1, so that pipe reinstalls a working crontab instead of one whoseSHELL=points at a missing wrapper. Use it for scripts, not to pick up one schedule change.- If any crontab fails to apply, in any mode (interactive or
--auto, one crontab or several), sync now exits 1. Before, it exited 0. --silenthides status messages. On an interactive run it still asksApply these changes?before sending or writing, so a monitored job's schedule cannot change with no confirmation. Combined with--auto, it also skips printing the crontab.- The name in Cronitor wins. Sync no longer sends the name from a
# Name:comment for a monitored job, so a rename in the dashboard stays. If the comment differs, sync updates it. It does not add a new# Name:comment. - If a monitor was deleted in Cronitor, sync warns and does not create it again. Sync cannot tell a deleted monitor from one that never existed, so a hand-written
CRONITOR=new-keyline for a monitor you have not created gets the same warning: create the monitor first, or remove the key and let sync add it. - Hand-written lines such as
CRONITOR=prune-eventsnow show the monitor's name from Cronitor. - If sync cannot load your monitors, it warns. It then asks about every job (with
--auto, it asks nothing) and sends each monitored job's schedule, because it cannot compare them. It does not rename monitors or add# Name:comments.
One summary, one question
- Sync now goes through every crontab first. Then it shows one summary per crontab (for example
1 new · 1 updated · 12 unchanged), with one line for each updated job (for exampleL3 Nightly backup: schedule 0 2 * * * → 30 3 * * *), and asksApply these changes? [Y/n]once. Before, each crontab was sent and saved as soon as you answered its questions. - If nothing changed, sync says so and asks nothing.
--autoapplies without asking, as before.--auto --dry-runprints the summary to stderr and the planned crontab to stdout.
Menu
- New item: "Skip this job, don't ask again". It adds
# cronitor: ignoreabove the line. A monitored job keeps reporting to Cronitor; sync just stops updating it. Delete the comment to undo. - Enter selects,
sskips, andq, Esc, Ctrl+C or Ctrl+D quit. While typing a name,sandqtype normally, Esc goes back, and Ctrl+C or Ctrl+D quit. After you quit, sync shows the summary and asks whether to save the answers you gave so far. - Changed: Ctrl+C now quits. Before, it skipped the job.
qand Esc also skipped the job by mistake. - Every option shows at once, with the keys listed below the menu.
- The job box fits the terminal and wraps long commands.
Windows scheduled tasks
Windows scheduled-task sync works as before: it still asks about every task, sends the full monitor, and --dry-run still sends (it only skips rewriting the task). The shared menu now shows every option at once and lists the keys. q, Esc and Ctrl+C still skip one task; Ctrl+D still stops without a save prompt. "Don't ask again" is not offered, because that flow cannot persist # cronitor: ignore.
Other changes
- Changed:
cronitor sync --dry-runnow sends nothing to Cronitor for Linux and macOS crontab sync. It shows what would change and does not write the crontab. Before, it created and updated monitors.--fileimports and Windows scheduled-task sync still send. - Without
sudo, sync prints one hint at the end when system crontabs have jobs it could not check, instead of one warning for each file.