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

    How does cron service get restarted ?

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 2 Posters 538 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.
    • B
      bgroper
      last edited by

      I'm using cron package on latest pfSense 2.7.0-RELEASE.
      From the GUI, I can go Services, Cron, and then add or edit the cron entries.
      After clicking at Save, how do the changes get applied to the running cron service ?
      Does the running service somehow reload the entries from /etc/crontab ?
      Or do I need to restart the cron service manually with

      # service cron restart

      Also, cron is not included in the pfSense GUI at Status, Services.
      Should cron be included here, so the user can restart using the GUI instead of cli ?

      I'm not a complete idiot. There's still a few pieces missing.

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @bgroper
        last edited by

        @bgroper said in How does cron service get restarted ?:

        Also, cron is not included in the pfSense GUI at Status, Services.

        A lot isn't visible in the GUI.

        The real thing is here : console or SSH, menu option 8 and type

        ps ax
        

        Now you see the real thing.

        You will also find this process :

        90135  -  Ss       0:01.25 /usr/sbin/cron -s
        

        That's the one that wakes up every minutes and checks the /etc/crontab file for work to do.
        it also checks /etc/cron.d/
        And /etc/periodic/.....

        @bgroper said in How does cron service get restarted ?:

        Does the running service somehow reload the entries from /etc/crontab ?
        Or do I need to restart the cron service manually with

        What about this one :
        Create a task, like a shell script file, that creates a file.
        Make the cron entry in the GUI. Have it execute at (now + 5 minutes).
        After 5 minutes : the file was created 😊

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        B 1 Reply Last reply Reply Quote 1
        • B
          bgroper @Gertjan
          last edited by

          @Gertjan

          For some reason, I wrongly assumed that cron would only read the crontab file when the service re/started.
          Thanks for the explanation, and the tips for how I could check this myself next time.
          +1

          I'm not a complete idiot. There's still a few pieces missing.

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