Squid cron jobs replaced after reboot



  • I want to run the job "swapstate_check.php" as installed by squid at a different time every day.
    So I added the cron package and changed the time of execution.
    But after a reboot my cron-job is removed and replace by the default one.

    Does anyone know how to make the modified job stay after a reboot?

    The background of the change:
    Every day I switch my home pfsense box 'off' at night and 'on' in the morning (I just unplug the power cable).
    Because power here is not stable and I do not want to drain my ups, let alone the beeping in the middle of the night.
    Squid helps with caching and blocking adds so I can pull as much as possible from my flunky 3G internet connection.
    But surely the box hangs every now and then with a 100% full disk because the cache is not properly managed due to the standard nightly time of swapstate-check job.



  • Squid replaces its cron jobs. Probably ought to leave them alone if it finds the job and just its time is different.



  • @cmb:

    Probably ought to leave them alone if it finds the job and just its time is different.

    That's the behaviour I expected but times are changed back to the default.

    This problem applies to more cron jobs: squid log rotate, clam-av virus update, etc.

    What is a proper workaround?
    make shell scripts that execute the php jobs and add them to cron?

    Does anyone know a better solution? (because this solution means maintenance with each future release)


Log in to reply