Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

37
OpenBSD cron(8) got a facelift
Post Body

Our beloved cron(8) got very cool extensions! A ~ shortcut was added to let cron(8) pick a random (consistent) timer value. This is useful when you want to run something once an hour but don't care when exactly. Another extension is the -s option which helps prevent overlapping process launches when you have (unexpectedly) long-running processes.

The below example shows the power of this utility. I want rpki-client to run once an hour, but not start if its still running from the previous hour. The 24 minute comes from the ~ operator. If I'd restart the cron(8) daemon a new value will be picked.

This is very exciting!

job@anton ~$ doas crontab -l | grep rpki-client ~ * * * * -n -s rpki-client -v job@anton ~$ doas grep rpki-client /var/cron/log | tail -3 Apr 17 14:24:01 anton cron[76532]: (root) CMD (rpki-client -v) Apr 17 15:24:01 anton cron[59536]: (root) CMD (rpki-client -v) Apr 17 16:24:01 anton cron[97530]: (root) CMD (rpki-client -v)

Author
Account Strength
90%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
4,219
Link Karma
3,157
Comment Karma
613
Profile updated: 2 days ago
Posts updated: 10 months ago
j0b
OpenBSD Developer

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago