Cron Jobs, Chmod & Server Utilities Explained (2026)

Cron and chmod with measured examples: how many times common cron schedules fire in 2027, why "0 0 13 * 5" ran 64 times instead of once, what each permission mode looks like in ls -l, and how umask decides the mode of new files.

DG
Derek Giordano
Designer & Developer

Cron Expressions

A standard cron line has five fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12) and day of week (0-7, where both 0 and 7 mean Sunday), followed by the command. * means every value, , lists values, - makes a range and / sets a step. We counted how often common schedules fire in 2027 with the croniter library:

ExpressionMeaningRuns in 2027
0 9 * * 1-59:00 every weekday261
*/15 * * * *every 15 minutes35,040
0 0 1 * *midnight on the 1st12
0 0 13 * *midnight on the 13th12
0 0 * * 5midnight every Friday53
0 0 13 * 5not "Friday the 13th"64

The last row is the classic trap. When both day of month and day of week are restricted, cron runs when either matches, so 0 0 13 * 5 fired 64 times in 2027, on every 13th and every Friday, while Friday the 13th happened only 1 time. To run only on Friday the 13th, schedule the 13th and test the weekday in the command: 0 0 13 * * [ "$(date +\%u)" = 5 ] && /path/job (in a crontab, a bare % means a newline, so it is escaped as \%).

File Permissions and chmod

Each file has read (4), write (2) and execute (1) bits for its owner, its group and everyone else; one octal digit per class adds them up. Python's stat.filemode renders each mode the way ls -l shows it:

Octalls -l showsTypical use
644-rw-r--r--Web pages, config files
600-rw-------Private keys, secrets
755drwxr-xr-xDirectories, scripts
700-rwx------Private scripts
4755-rwsr-xr-xSetuid program (runs as its owner)
2755-rwxr-sr-xSetgid (group inherited)
1777drwxrwxrwtShared temp directory (sticky bit)
777-rwxrwxrwxAlmost never right

New files get their mode from the creating program minus the umask. We created a file and a directory under two umasks: with umask 022 they came out as 644 and 755; with umask 077 as 600 and 700. If uploads land with the wrong permissions, look at the umask before reaching for chmod. Convert between notations in the Chmod Calculator.

Browse all utility tools →
⚡ Try the free .htaccess Generator →
⏰
Try Cron Builder
Free, no signup →