Bug 15111 - crond appears not to correctly parse step and list entries
Summary: crond appears not to correctly parse step and list entries
Status: RESOLVED INVALID
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.35.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-09 10:37 UTC by Robert McQueen
Modified: 2022-11-09 10:48 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert McQueen 2022-11-09 10:37:25 UTC
It appears from inspecting the code that busybox crond intends to find and use step (ie n/m per https://git.busybox.net/busybox/tree/miscutils/crond.c#n286) and list (ie x,y,z per https://git.busybox.net/busybox/tree/miscutils/crond.c#n313) values from crontab entries, allowing a job to be scheduled at eg several nonconsecutive hours during the same day. Running crond with -d 5 to expect the filled arrays, this code appears not to be working correctly.

Crontab entry: 14 2/6 * * *

Debug output:
000000000000001000000000000000000000000000000000000000000000
001000000000000000000000
11111111111111111111111111111111
111111111111
1111111

Expected output:
000000000000001000000000000000000000000000000000000000000000
001000001000001000001000
11111111111111111111111111111111
111111111111
1111111

Crontab entry: 14 2,10,18 * * *

Debug output:
000000000000001000000000000000000000000000000000000000000000
001000000000000000000000
11111111111111111111111111111111
111111111111
1111111

Expected output:
000000000000001000000000000000000000000000000000000000000000
001000000010000000100000
11111111111111111111111111111111
111111111111
1111111
Comment 1 Robert McQueen 2022-11-09 10:48:21 UTC
Resolving as invalid; sorry for time-wasting! The first syntax should be 2-23/6, which works, and in the second case I swapped around my debug logs and it does in fact work as intended.