Inspect your user crontab first
Run crontab -l to view your account's existing table. A message that no crontab exists can be normal for a new account. If crontab itself is unavailable, stop and identify your distribution's supported scheduling setup instead of pasting installation instructions for another Linux family. man crontab and man 5 crontab describe your installed command and format.
Use crontab -e to edit your own table. Preserve any existing jobs, and learn how to save and exit the selected editor before adding one. Do not edit spool files directly. A user crontab runs with that user's authority; adding sudo changes which account's setup you are managing and is unnecessary for the harmless example below.
Read the five fields from left to right
A conventional user entry has five time fields followed by the command. A system crontab may add a username between the time fields and command; do not copy that extra field into your user table. A six-field expression that includes seconds may belong to a different scheduler and is not interchangeable.
An asterisk allows every value in a field. A list selects alternatives, a range selects a span, and a step advances within a field. Start with simple patterns you can describe aloud. Write comments on their own lines rather than appending an explanation that cron could interpret as part of the command.
| Position | Meaning | Basic values |
|---|---|---|
| 1 | Minute | 0–59 |
| 2 | Hour | 0–23 |
| 3 | Day of month | 1–31 |
| 4 | Month | 1–12 |
| 5 | Day of week | 0–6; 0 is Sunday |
Translate the pattern into actual clock times
0 9 * * 1 means 09:00 on Mondays in the schedule's applicable timezone. */15 * * * * selects minutes 00, 15, 30 and 45 of each hour. It does not mean fifteen minutes after you install the entry, and a step does not form an endlessly running stopwatch across field boundaries.
With traditional cron matching, restricting both day-of-month and day-of-week generally allows either of those day conditions to match. For example, 0 9 1 * 1 can run on the first of the month and on Mondays, rather than only on a Monday that is also the first. Use the builder to check the simple expression, then confirm the rule in your installed scheduler's documentation.
First schedule something harmless and visible
Run /usr/bin/date in your terminal first. On a standard Ubuntu system it prints the current date and time without changing the clock. In crontab -e, add the single example line below. It appends a timestamp to a named file in your home once per minute while the scheduler and computer are operating. Save, then use crontab -l to confirm the intended line is present.
After allowing time for a scheduled minute, inspect the file in your text editor or with less. This is a suggested verification exercise, not a claim that it has run on your machine. Once you have observed the result, remove only that temporary entry with crontab -e and save again. Keep other jobs intact.
* * * * * /usr/bin/date >> "$HOME/digitalmaple-cron-check.log" 2>&1Make the command independent of your open terminal
Cron does not reproduce your interactive session. Its shell, PATH and environment can differ; Cronie documents /bin/sh as the default shell. Shell aliases, an activated development environment and variables exported in another terminal are poor assumptions for a scheduled task. Use an explicit interpreter and absolute script path where appropriate, and arrange any required working directory deliberately.
The example uses an absolute date path and an explicit log destination. In the shell, >> appends output and 2>&1 sends error output to the same destination. A growing log needs an eventual retention plan. Avoid recording passwords or access tokens. Cronie also gives percent signs special meaning inside crontab command text, so move complicated commands into a reviewed script instead of embedding date-format expressions blindly.
Decide what a missed or repeated run would mean
Confirm the machine's timezone and the scheduler's interpretation of it. Daylight-saving changes can skip or repeat local clock times, and implementations contain different handling for clock adjustments. Features such as CRON_TZ are not portable to every scheduler. Do not assume a schedule is in UTC because a separate website displays UTC, or because you prefer it.
A laptop may be asleep, powered off or disconnected when a job is due. Catch-up behaviour requires a scheduler and configuration that provide it; a five-field expression alone promises none. For a task that must run after downtime, consider a documented systemd calendar timer with the appropriate Persistent setting. Confirm its behaviour for your use case rather than treating it as automatic backup reliability.
Make success distinguishable from silence
Before scheduling useful work, define a visible success result and a way to notice failure. A log that a command started is weaker evidence than checking its intended output. If a run can exceed its interval, consider overlap before enabling repetition. Prefer operations that can safely repeat, and keep an independent way to verify important results.
If the test log never appears, check that the entry was saved, the due time passed while the system was awake, the command path exists and the account can write the destination. Then consult the scheduler's own status and logs. Email output requires a working mail setup; lack of email is not proof of success. Keep scheduling and command troubleshooting as two separate checks.
Sources & further reading
Documentation reviewed .
Ubuntu manpages — crontab(1), individual user tables ↗Ubuntu Server documentation — Run with cron ↗Cronie upstream — crontab(5), schedule format and environment ↗Cronie upstream — cron(8), daemon and clock handling ↗GNU Bash — Redirections ↗systemd — systemd.timer, including Persistent calendar timers ↗GNU Coreutils — date invocation ↗This guide is based on the sources linked above, with original explanations and examples. Software interfaces and service features can change. A documentation-based guide is not a hands-on product review. Read our editorial policy or report a correction.