Sample Header Ad - 728x90

Merge two different times in cron format

-1 votes
1 answer
35 views
I want to combine two different times which are in cron format into single time in bash shell script: e.g.
time1 = 15 03 * * 1-5 
time2 = 15 03 * * 6
result should be
15 03 * * 1-6
or e.g.
time1 = 00 05 * * 1-3 
time2 = 00 05 * * 3-5
result should be
00 05 * * 1-5
I can ignore time part for now and only consider day of the week.
Asked by Vishal (1 rep)
May 20, 2025, 12:39 PM
Last activity: May 20, 2025, 12:56 PM