Skip to content

How to Automate Commands Using Cron Jobs (Linux, Debian-based)

Cron is a time-based job scheduler available in most Unix-like operating systems.
It allows system administrators to automate repetitive tasks such as fan control or system monitoring.

This guide demonstrates how to use Cron jobs on Debian-based systems, including integration with ipmitool.


Cron jobs execute commands automatically at scheduled times defined in a specific syntax.

* * * * * <command>
│ │ │ │ │
│ │ │ │ └── Day of week (0–6)
│ │ │ └──── Month (1–12)
│ │ └────── Day of month (1–31)
│ └──────── Hour (0–23)
└────────── Minute (0–59)

Terminal window
33 * * * * root <command>
56 * * * * root ipmitool raw 0x30 0x70 0x66 0x01 0x01 0x00
55 * * * * root ipmitool raw 0x30 0x70 0x66 0x01 0x00 0x00

Explanation:

  • The first job runs every 33rd minute of every hour.
  • The following two set fan speeds in two chassis zones at minute 55 and 56.

Ensure TAB spacing between time fields, user, and command.


On Debian-based systems (Proxmox, Ubuntu, TrueNAS SCALE)

Section titled “On Debian-based systems (Proxmox, Ubuntu, TrueNAS SCALE)”

Edit Cron jobs:

Terminal window
crontab -e

or system-wide jobs in /etc/crontab.

In TrueNAS SCALE:

System → Cron Jobs → Add

![Cron Job Command](”./Scherm­afbeelding 2026-01-11 om 12.31.15.png”)


List all Cron jobs:

Terminal window
crontab -l

Test the command manually before scheduling.


See How to Control Fan Speed Using IPMI-tool Raw Commands.


Vixie, P. (1994). Cron Daemon Documentation. Internet Systems Consortium (ISC).