I need to calculate the time remaining for the next run of a specific job in my Cron Schedule, I've a Cron with jobs having frequencies of per hour, thrice a day etc, no jobs running on specific days/dates hence just HH:MM:SS is concerned, also I do not have right to check /var/spool/cron/ in my RHEL. If some job starts at 9:30,
**30 9** * * * /some/job.sh
-bash-3.2$ date +"%H:%M"
**13:52**
I'd need output as, 19 Hours and 38 Minutes How would I be knowing the total time until next run occurs from current system time? Calculation of seconds is concerned only around the job time.
Aucun commentaire:
Enregistrer un commentaire