scron

simple cron daemon
git clone git://git.2f30.org/scron
Log | Files | Refs | README | LICENSE

commit ae38eda6a95910cbbac163f65bca57f20e574d78
parent c0b6c6198289a7a0ce1cb92885d54219c7ba9f0b
Author: sin <sin@2f30.org>
Date:   Mon,  7 Jul 2014 07:46:58 +0100

A bit more consistent output

Diffstat:
Mcrond.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/crond.c b/crond.c @@ -113,13 +113,13 @@ runjob(char *cmd) pid = fork(); if (pid < 0) { - logerr("error: failed to fork job: %s at %s", + logerr("error: failed to fork job: %s time: %s", cmd, ctime(&t)); } else if (pid == 0) { loginfo("run: %s pid: %d at %s", cmd, getpid(), ctime(&t)); execl("/bin/sh", "/bin/sh", "-c", cmd, (char *)NULL); - logerr("error: failed to execute job: %s at %s", + logerr("error: failed to execute job: %s time: %s", cmd, ctime(&t)); _exit(EXIT_FAILURE); } @@ -141,7 +141,7 @@ waitjob(void) continue; } if (WIFEXITED(status) == 1) { - loginfo("complete: pid: %d, return: %d time: %s", + loginfo("complete: pid: %d returned: %d time: %s", pid, WEXITSTATUS(status), ctime(&t)); continue; }