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

    Cron 0.1.8 wont run reboot command

    pfSense Packages
    4
    12
    3.4k
    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.
    • X
      xbipin
      last edited by

      the new cron package on the latest pfsense doesnt seems to reboot the box using reboot command, the older version works fine but it seems the upate a month agao caused this not to work any longer

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        The change to cron last month would not have had any impact on that. It was only a change to how the cron process itself was stopped and started.

        Make sure you're running the correct command with the full path, and/or try calling the reboot php script using:
        /usr/local/bin/php -f /etc/rc.reboot

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • X
          xbipin
          last edited by

          i tried the command u gave with the full path but still nothing happens, earlier using reboot command only also used to work, is there any way to debug this?

          1 Reply Last reply Reply Quote 0
          • X
            xbipin
            last edited by

            would it be possible to get the old cron package till the issue is sorted out?

            1 Reply Last reply Reply Quote 0
            • marcellocM
              marcelloc
              last edited by

              can you check if your cron settings are present on crontab file?

              Treinamentos de Elite: http://sys-squad.com

              Help a community developer! ;D

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                @xbipin:

                would it be possible to get the old cron package till the issue is sorted out?

                The binaries are the same – they're on pfSense, not in the cron package. All the cron package does is manipulate config.xml, and stop/start the cron service as needed.

                Unless the cron service is not running, it's doubtful that the package is doing anything different from the last version to this one.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • X
                  xbipin
                  last edited by

                  i agree the package hasnt changed much at all but since the upgrade to the new cron on one of my boxes, it fails to run the command, the serice is running fine and i checked that only initially but for some reason the command isnt issued at all.

                  can u give me the location of the crontab file so i can check that

                  1 Reply Last reply Reply Quote 0
                  • R
                    Ramosel
                    last edited by

                    I'll throw a twist into this.  I have two boxes now running 2.1 with all the same packages running.  The one running at my neighbor's (while his son is building his own) was a 2.0.3 upgrade to 2.1 and the weekly reboot still runs fine.  Mine is a 2.1 fresh build and I'm seeing the same issue as xbipin.  Reboot just never happens.  Jim, I just changed to the path you recommended and set the job to daily.  I'll let you know how it works.

                    Rick

                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      For giggles, I added a cron command for "/etc/rc.reboot" to my VM and set it to reboot at 10am. It just rebooted, and it's on the most current version of the cron package.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • X
                        xbipin
                        last edited by

                        i tried a different command and now it works, summary as follows:

                        command = reboot (works in old cron but not new)

                        command = /etc/rc.reboot (works in both crons)

                        command = /usr/local/bin/php -f /etc/rc.reboot (doesnt work in both crons)

                        when it rebooted i noticed this error in serial console for new cron

                        Starting CRON... done.
                         Starting package Cron...[: 0: unexpected operator
                        done.
                        Bootup complete[/code]
                        
                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate
                          last edited by

                          Are you sure you have the most current version of the cron package?

                          : ps uxawww | grep '[c]ron -s'
                          root    29903  0.0  0.3  7928  1604  ??  Is   11:14AM   0:00.00 /usr/sbin/cron -s
                          : /usr/local/etc/rc.d/cron.sh stop
                          : ps uxawww | grep '[c]ron -s'
                          : /usr/local/etc/rc.d/cron.sh start
                          : ps uxawww | grep '[c]ron -s'
                          root    33179  0.0  0.3  7928  1604  ??  Ss   11:14AM   0:00.00 /usr/sbin/cron -s
                          

                          No errors here.

                          and "reboot" is a bad idea no matter what. Always use /etc/rc.reboot or you risk losing data.

                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

                          1 Reply Last reply Reply Quote 0
                          • X
                            xbipin
                            last edited by

                            i reinstalled the cron package, it was the latest one though, and the error disappeared, use the below works for me so will stick with it

                            command = /etc/rc.reboot (works in both crons)

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