Skip to content

Conversation

casperklein
Copy link
Contributor

Description

#1788 introduced an error: BusyBox crond does not support 7 for Sundays. Changing it to 0 fixes the issue.

Before:

d6063bb15688:/# crond -f -d 8
crond: crond (busybox 1.36.1) started, log level 8
crond: user root: parse error at 7

After:

d6063bb15688:/# vi /var/spool/cron/crontabs/root # replace 7 with 0
d6063bb15688:/# crond -f -d 8
crond: crond (busybox 1.36.1) started, log level 8

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Signed-off-by: casperklein <casperklein@users.noreply.github.com>
@PromoFaux
Copy link
Member

Good catch - bloody busybox.

Could you also add in a test to ensure any issues in future changes to the cron file are caught by the CI:

def test_cronfile_valid(docker):
    func = docker.run(
        """
        /usr/bin/crontab /crontab.txt
        crond -d 8 -L /cron.log
        grep 'parse error' /cron.log
    """
    )
    assert "parse error" not in func.stdout

Should work - to test the test run ./build-and-test.sh from the repo root

Signed-off-by: casperklein <casperklein@users.noreply.github.com>
@PromoFaux PromoFaux merged commit 3c86c4a into pi-hole:development Apr 4, 2025
6 checks passed
@PromoFaux
Copy link
Member

Thanks, I've just tagged 2025.04.0 to get this fix out in the wild

@casperklein casperklein deleted the fix-crond branch April 4, 2025 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants