$cur_time) { return $next_time; } if ($min == '*' && $hour == '*' && $wday == '*' && $mday == '*' && $mon == '*') { list ($nex_min, $nex_hour, $nex_mday, $nex_mon, $nex_year) = explode (" ", date ("i H d m Y", $next_time + 60)); } else if ($hour == '*' && $wday == '*' && $mday == '*' && $mon == '*') { list ($nex_min, $nex_hour, $nex_mday, $nex_mon, $nex_year) = explode (" ", date ("i H d m Y", $next_time + 3600)); } else if ($mday == '*' && $mon == '*') { list ($nex_min, $nex_hour, $nex_mday, $nex_mon, $nex_year) = explode (" ", date ("i H d m Y", $next_time + 86400)); } else if ($mon == '*') { $nex_mon = $nex_mon + 1; if ($nex_mon > 11) { $nex_mon = 0; $nex_year++; } } else { $nex_year++; } $count++; } while ($count < 86400); // Something went wrong, default to 5 minutes return $cur_time + 300; } ?>