Skip to content

Scheduling

Running jobs regularly with cron and systemd timers, once at a set time with at, catching up on missed jobs and making sure a job never runs twice at the same time.

Basics: cron syntax, where cron jobs live and systemd timers compared

cron

  • crontab


    Show and edit the cron jobs of a user.

  • run-parts


    Run all scripts in a directory.

  • anacron


    Catch up on missed daily jobs.

One-time jobs

  • at


    Run a command once at a given time.

  • atq


    List waiting at jobs.

  • atrm


    Remove waiting at jobs.

  • batch


    Run a job when the load is low.

Avoid overlaps

  • flock


    Never run a job twice at the same time.

From other chapters

  • systemctl


    systemctl list-timers shows all systemd timers. Covered in the chapter systemd.

  • systemd-run


    Run a command once at a later time as a temporary timer. Covered in the chapter systemd.

  • systemd-analyze


    Check timer expressions with systemd-analyze calendar. Covered in the chapter systemd.