Skip to content

Commit ed53cd1

Browse files
Fix for the cron job "0 0 * * *" calculation.
The fix is to check when the minutes is equal or greater than.
1 parent 15fab0f commit ed53cd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MerlinAU.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3146,7 +3146,7 @@ _EstimateNextCronTimeAfterDate_()
31463146
then
31473147
for this_hour in $(expand_cron_field "$hour_field" 0 23)
31483148
do
3149-
if [ "$this_hour" -gt "$current_hour" ] || [ "$loopCount" -gt 1 ]
3149+
if [ "$this_hour" -gt "$current_hour" ]
31503150
then
31513151
for this_min in $(expand_cron_field "$minute_field" 0 59)
31523152
do
@@ -3158,7 +3158,7 @@ _EstimateNextCronTimeAfterDate_()
31583158
then
31593159
for this_min in $(expand_cron_field "$minute_field" 0 59)
31603160
do
3161-
if [ "$this_min" -gt "$current_minute" ]
3161+
if [ "$this_min" -ge "$current_minute" ]
31623162
then
31633163
echo "$(date -d "@$(date '+%s' -d "$current_year-$current_month-$current_day $this_hour:$this_min")" '+%Y-%m-%d %H:%M:%S')"
31643164
found=true

0 commit comments

Comments
 (0)