Bug 15111

Summary: crond appears not to correctly parse step and list entries
Product: Busybox Reporter: Robert McQueen <robert>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED INVALID    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.35.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

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.