if (debug_opt && !is_hasrun(new_l->cl_option)) {
struct tm *ftime;
ftime = localtime(&new_l->cl_nextexe);
- debug(" from last conf: %s next exec %d/%d/%d"
- " wday:%d %02d:%02d:%02d (system time)",
- new_l->cl_shell,
- (ftime->tm_mon + 1), ftime->tm_mday,
- (ftime->tm_year + 1900), ftime->tm_wday,
- ftime->tm_hour, ftime->tm_min, ftime->tm_sec);
+ debug
+ (" from last conf: %s next exec %04d-%02d-%02d"
+ " wday:%d %02d:%02d:%02d (system time)",
+ new_l->cl_shell, (ftime->tm_year + 1900),
+ (ftime->tm_mon + 1), ftime->tm_mday,
+ ftime->tm_wday, ftime->tm_hour, ftime->tm_min,
+ ftime->tm_sec);
}
break;
if (debug_opt && !(is_runonce(cl->cl_option) && is_hasrun(cl->cl_option))) {
struct tm *ftime;
ftime = localtime(&(cl->cl_nextexe));
- debug(" cmd %s next exec %d/%d/%d wday:%d %02d:%02d:%02d"
+ debug(" cmd %s next exec %04d-%02d-%02d wday:%d %02d:%02d:%02d"
" (system time)",
- cl->cl_shell, (ftime->tm_mon + 1), ftime->tm_mday,
- (ftime->tm_year + 1900), ftime->tm_wday,
- ftime->tm_hour, ftime->tm_min, ftime->tm_sec);
+ cl->cl_shell, (ftime->tm_year + 1900), (ftime->tm_mon + 1),
+ ftime->tm_mday, ftime->tm_wday, ftime->tm_hour, ftime->tm_min,
+ ftime->tm_sec);
}
/* add the current line to the list, and allocate a new line */
if (debug_opt)
set_wday(ftime);
- debug(" %s beginning of next period %d/%d/%d wday:%d %02d:%02d "
- "(tzdiff=%d, timezone=%s)", line->cl_shell, (ftime->tm_mon + 1),
- ftime->tm_mday, (ftime->tm_year + 1900), ftime->tm_wday,
+ debug(" %s beginning of next period %04d-%02d-%02d wday:%d %02d:%02d "
+ "(tzdiff=%d, timezone=%s)", line->cl_shell, (ftime->tm_year + 1900),
+ (ftime->tm_mon + 1), ftime->tm_mday, ftime->tm_wday,
ftime->tm_hour, ftime->tm_min, line->cl_file->cf_tzdiff,
(line->cl_tz != NULL) ? line->cl_tz : "localtime");
}
}
- debug(" %s %s %d/%d/%d wday:%d %02d:%02d (tzdiff=%d, timezone=%s)",
+ debug(" %s %s %04d-%02d-%02d wday:%d %02d:%02d (tzdiff=%d, timezone=%s)",
line->cl_shell,
(where ==
END_OF_INTERVAL) ? "end of interval" : "begin of next period",
- (ftime->tm_mon + 1), ftime->tm_mday, (ftime->tm_year + 1900),
+ (ftime->tm_year + 1900), (ftime->tm_mon + 1), ftime->tm_mday,
ftime->tm_wday, ftime->tm_hour, ftime->tm_min,
line->cl_file->cf_tzdiff,
(line->cl_tz != NULL) ? line->cl_tz : "localtime");
struct tm int_end;
time_t int_end_timet;
- debug(" cmd: %s begin int exec %d/%d/%d wday:%d %02d:%02d "
+ debug(" cmd: %s begin int exec %04d-%02d-%02d wday:%d %02d:%02d "
"(tzdiff=%d, timezone=%s)", line->cl_shell,
- (ftime.tm_mon + 1), ftime.tm_mday, (ftime.tm_year + 1900),
+ (ftime.tm_year + 1900), (ftime.tm_mon + 1), ftime.tm_mday,
ftime.tm_wday, ftime.tm_hour, ftime.tm_min,
line->cl_file->cf_tzdiff,
(line->cl_tz != NULL) ? line->cl_tz : "localtime");
ft = localtime(&nextexe);
memcpy(&ftime, ft, sizeof(ftime));
}
- send_msg_fd_debug(info_fd, " cmd: %s next exec %d/%d/%d wday:%d "
+ send_msg_fd_debug(info_fd,
+ " cmd: %s next exec %04d-%02d-%02d wday:%d "
"%02d:%02d:%02d (tzdiff=%d, timezone=%s)",
- line->cl_shell, (ftime.tm_mon + 1), ftime.tm_mday,
- (ftime.tm_year + 1900), ftime.tm_wday,
+ line->cl_shell, (ftime.tm_year + 1900),
+ (ftime.tm_mon + 1), ftime.tm_mday, ftime.tm_wday,
ftime.tm_hour, ftime.tm_min, ftime.tm_sec,
line->cl_file->cf_tzdiff,
(line->cl_tz != NULL) ? line->cl_tz : "system's");
* ( localtime() is used in the debug() function) */
memcpy(&ftime, ft, sizeof(struct tm));
- send_msg_fd_debug(info_fd, " cmd: %s next exec %d/%d/%d wday:%d "
+ send_msg_fd_debug(info_fd,
+ " cmd: %s next exec %04d-%02d-%02d wday:%d "
"%02d:%02d:%02d (system time)", line->cl_shell,
- (ftime.tm_mon + 1), ftime.tm_mday,
- (ftime.tm_year + 1900), ftime.tm_wday, ftime.tm_hour,
+ (ftime.tm_year + 1900), (ftime.tm_mon + 1),
+ ftime.tm_mday, ftime.tm_wday, ftime.tm_hour,
ftime.tm_min, ftime.tm_sec);
}
switch (context) {
case SYSDOWN:
fprintf(mailf, "Line %s has not run since and including "
- "%d/%d/%d wday:%d %02d:%02d (timezone=%s)\n"
+ "%04d-%02d-%02d wday:%d %02d:%02d (timezone=%s)\n"
"due to system's down state.\n",
- line->cl_shell, (since->tm_mon + 1), since->tm_mday,
- (since->tm_year + 1900), since->tm_wday, since->tm_hour,
- since->tm_min, (line->cl_tz) ? line->cl_tz : "system's");
- fprintf(mailf, "It will be next executed at %d/%d/%d wday:"
- "%d %02d:%02d\n", (time.tm_mon + 1), time.tm_mday,
- (time.tm_year + 1900), time.tm_wday, time.tm_hour, time.tm_min);
+ line->cl_shell, (since->tm_year + 1900), (since->tm_mon + 1),
+ since->tm_mday, since->tm_wday, since->tm_hour, since->tm_min,
+ (line->cl_tz) ? line->cl_tz : "system's");
+ fprintf(mailf,
+ "It will be next executed at %04d-%02d-%02d wday:"
+ "%d %02d:%02d\n", (time.tm_year + 1900), (time.tm_mon + 1),
+ time.tm_mday, time.tm_wday, time.tm_hour, time.tm_min);
break;
case LAVG:
fprintf(mailf, "Line %s has not run since and including "
- "%d/%d/%d wday:%d %02d:%02d (timezone=%s)\n",
- line->cl_shell, (since->tm_mon + 1), since->tm_mday,
- (since->tm_year + 1900), since->tm_wday, since->tm_hour,
- since->tm_min, (line->cl_tz) ? line->cl_tz : "system's");
- fprintf(mailf, "due to a too high system load average or "
+ "%04d-%02d-%02d wday:%d %02d:%02d (timezone=%s)\n",
+ line->cl_shell, (since->tm_year + 1900), (since->tm_mon + 1),
+ since->tm_mday, since->tm_wday, since->tm_hour, since->tm_min,
+ (line->cl_tz) ? line->cl_tz : "system's");
+ fprintf(mailf,
+ "due to a too high system load average or "
"too many lavg-serial jobs.\n");
- fprintf(mailf, "It will be next executed at %d/%d/%d "
- "wday:%d %02d:%02d (timezone=%s)\n", (time.tm_mon + 1),
- time.tm_mday, (time.tm_year + 1900), time.tm_wday, time.tm_hour,
+ fprintf(mailf,
+ "It will be next executed at %04d-%02d-%02d "
+ "wday:%d %02d:%02d (timezone=%s)\n", (time.tm_year + 1900),
+ (time.tm_mon + 1), time.tm_mday, time.tm_wday, time.tm_hour,
time.tm_min, (line->cl_tz) ? line->cl_tz : "system's");
break;
case QUEUE_FULL:
fprintf(mailf, "Line %s couldn't be added to lavg or serial queue which"
- " is full ( %d/%d/%d wday:%d %02d:%02d (timezone=%s)).\n",
- line->cl_shell, (time.tm_mon + 1), time.tm_mday,
- (time.tm_year + 1900), time.tm_wday, time.tm_hour, time.tm_min,
+ " is full ( %04d-%02d-%02d wday:%d %02d:%02d (timezone=%s)).\n",
+ line->cl_shell, (time.tm_year + 1900), (time.tm_mon + 1),
+ time.tm_mday, time.tm_wday, time.tm_hour, time.tm_min,
(line->cl_tz) ? line->cl_tz : "system's");
- fprintf(mailf, "Consider using options lavgonce, until, strict, "
+ fprintf(mailf,
+ "Consider using options lavgonce, until, strict, "
"serialonce and/or fcron's option -m.\n");
fprintf(mailf, "Note that job %s has not run.\n", line->cl_shell);
break;