• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 Nov 22, 2013, 4:36 PM

    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
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Nov 22, 2013, 6:04 PM

      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 Nov 23, 2013, 5:01 AM

        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 Nov 25, 2013, 6:05 AM

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

          1 Reply Last reply Reply Quote 0
          • M
            marcelloc
            last edited by Nov 25, 2013, 1:09 PM

            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
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by Nov 25, 2013, 1:16 PM

              @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 Nov 25, 2013, 2:02 PM

                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 Nov 25, 2013, 2:36 PM

                  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
                  • J
                    jimp Rebel Alliance Developer Netgate
                    last edited by Nov 25, 2013, 3:02 PM

                    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 Nov 26, 2013, 6:09 AM

                      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
                      • J
                        jimp Rebel Alliance Developer Netgate
                        last edited by Nov 26, 2013, 4:15 PM

                        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 Nov 27, 2013, 8:01 AM

                          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
                          12 out of 12
                          • First post
                            12/12
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                            This community forum collects and processes your personal information.
                            consent.not_received