Does anyone know how I can simulate a cron job execution via UNIX scripting or is there a command/tool that simulate this?
I have a file I called "appSchedule.txt", it contains below lines:
00 03 * * 1-6 RED start
00 06 * * 0 RED start
00 21 * * * RED stop
00 03 * * 1-6 BLUE start
00 06 * * 0 BLUE start
00 21 * * * BLUE stop
If you noticed, it like a cron entries. What I need is for my script to output only (when I execute the script at any time/date) the the color that is scheduled to run based on the schedule given for it in the appSchedule.txt file. Just like what cron does, it executes only the lines that matches the schedule on it versus the current system time/date. Can anyone help me with the scripting for that?