Sample Header Ad - 728x90

Executing a cron task once a month at a random date and time

2 votes
4 answers
230 views
Ubuntu 22.04 or AlmaLinux 9.5 I've seen a lot of questions about running scripts in random times during a day using bash's $RANDOM but a month exceeds the limit it has. How can I do that? It is a xdg-opencommand to be executed no more than twice a month (exceptionally more in case of power off), any day, any time, random, not the same date every month. The time between 2 consecutive tasks must not be more than 30 days.
Asked by Daniel Stonek (21 rep)
Apr 29, 2025, 12:33 AM
Last activity: May 14, 2025, 01:02 PM