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

    Cron 0.1.8 wont run reboot command

    Scheduled Pinned Locked Moved pfSense Packages
    12 Posts 4 Posters 3.4k 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.
    • 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.