You can simply generate a random number each day (with one crontab file that runs only once at the beginning of the day) that corresponds to the number of minutes (or 5 minute intervals) each day, and write that number to a file.
Then, you have a second crontab file that reads the random number in the file and checks against the time and executes if there is match.
If you are using PHP, you can also try to use PHP shared memory, or you could use an environmental variable to hold the daily random number. There are many ways to do this.
---------- Post updated at 04:38 ---------- Previous update was at 04:34 ----------
Quote:
Originally Posted by
ctsgnb
maybe use the "at" command instead ?
While it is possible to set something up with the
at command, the original poster asked for a
crontab solution.
This is easily done with cron, as requested by the original poster.
(See my post above)