Skip to content

Commit

Permalink
man/crontab.5: Fix escapes in formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
t8m committed Apr 8, 2024
1 parent 24e7c0a commit e96aebd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions man/crontab.5
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ crontab entry won\'t cause that entry to be executed every 35 minutes;
instead, it will be executed twice every hour, at 0 and 35 minutes past.
For more fine-grained control you can do something like this:
.nf
* * * * * if [ $(expr \( $(date +\%s) / 60 \) \% 58) = 0 ]; then echo this runs every 58 minutes; fi
0 * * * * if [ $(expr \( $(date +\%s) / 3600 \) \% 23) = 0 ]; then echo this runs every 23 hours on the hour; fi
* * * * * if [ $(expr \\( $(date +%s) / 60 \\) % 58) = 0 ]; then echo this runs every 58 minutes; fi
0 * * * * if [ $(expr \\( $(date +%s) / 3600 \\) % 23) = 0 ]; then echo this runs every 23 hours on the hour; fi
.fi
Adjust as needed if your
.BR date (1)
Expand Down

0 comments on commit e96aebd

Please sign in to comment.