@@ -39,12 +39,12 @@ namespace libcron
3939 {
4040 // First, check for "convenience scheduling" using @yearly, @annually,
4141 // @monthly, @weekly, @daily or @hourly.
42- std::string tmp = std::regex_replace (cron_expression, std::regex (" @yearly" ), " 0 0 1 1 *" );
43- tmp = std::regex_replace (tmp, std::regex (" @annually" ), " 0 0 1 1 *" );
44- tmp = std::regex_replace (tmp, std::regex (" @monthly" ), " 0 0 1 * *" );
45- tmp = std::regex_replace (tmp, std::regex (" @weekly" ), " 0 0 * * 0" );
46- tmp = std::regex_replace (tmp, std::regex (" @daily" ), " 0 0 * * *" );
47- const std::string expression = std::regex_replace (tmp, std::regex (" @hourly" ), " 0 * * * *" );
42+ std::string tmp = std::regex_replace (cron_expression, std::regex (" @yearly" ), " 0 0 0 1 1 *" );
43+ tmp = std::regex_replace (tmp, std::regex (" @annually" ), " 0 0 0 1 1 *" );
44+ tmp = std::regex_replace (tmp, std::regex (" @monthly" ), " 0 0 0 1 * *" );
45+ tmp = std::regex_replace (tmp, std::regex (" @weekly" ), " 0 0 0 * * 0" );
46+ tmp = std::regex_replace (tmp, std::regex (" @daily" ), " 0 0 0 * * ? " );
47+ const std::string expression = std::regex_replace (tmp, std::regex (" @hourly" ), " 0 0 * * * ? " );
4848
4949 // Second, split on white-space. We expect six parts.
5050 std::regex split{ R"#( ^\s*(.*?)\s+(.*?)\s+(.*?)\s+(.*?)\s+(.*?)\s+(.*?)\s*$)#" ,
0 commit comments