[Toybox] [PATCH] crond: Fix timing
Kana Steimle
kanasteimle at gmail.com
Sun Jan 12 13:58:34 PST 2025
It seems the original author of crond slightly messed up the logic for
checking whether the current time matches the time that was specified.
This patch fixes it.
For some reason there was an OR where there should have been an AND,
which meant if the time and day of month OR the month and day of week
match the current time, the job would run. So you'd get jobs running
every minute if the day of week and month match. And if they didn't
match, you'd still get the job running if the time and day of month
match.
Also, in the tm struct, the day of the month (tm_mday) starts at 1,
not the month (tm_mon).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: toybox-crond-fix_timing.patch
Type: text/x-patch
Size: 691 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20250112/0b7cd3de/attachment.bin>
More information about the Toybox
mailing list