Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squid cron jobs replaced after reboot

    Scheduled Pinned Locked Moved Cache/Proxy
    3 Posts 2 Posters 789 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MFKroon
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • M
          MFKroon
          last edited by

          @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)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.