Hey... again!
Major changes take their time but now I've finished writing the new daemon. I'd be very happy if someone would have a look at the code (link posted below) before I commit it to the repository. Valgrind says there are no memory leaks and I'm running some long-term tests on a m0n0wall VM right now.
Let's be realistic: It will probably take another week until I've finished updating the php files.
There are 3 files in the archive. croen.c is the new daemon, croen.conf is the config file for the new daemon and croen_exec_debug.c is a simple program that sleeps for a second and logs temp data of the new daemon. Understanding the conf file is probably easy. The only thing that isn't really obvious is the last digit of "weekly" (Monday = 1, ..., Sunday = 7) and "monthly" (1 = first day of the month) jobs.
If the cmdprefix is "/usr/local/bin/croen_exec_debug /etc/croen_jobs/", the cmdpostfix is ".cjob" and the job is called "test_once" the following command will be executed: "/usr/local/bin/croen_exec_debug /etc/croen_jobs/test_once.cjob". Be aware that spaces at the end of the line will be trimmed - not perfect, I know.
Edit: I've found a small bug and fixed it. In addition the program will now skip a loop and recalculate the target time if the time has been changed by more than +/-2 hours (instead of +/-12 hours).
Regards,
Lennart