Navigation

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

    Auto restart with cron.. How to do it?

    General pfSense Questions
    6
    9
    12974
    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.
    • J
      jdwilliams last edited by

      I want to reboot the box everynight at 2 am..any idea how i can do this?

      1 Reply Last reply Reply Quote 0
      • F
        focalguy last edited by

        Install the cron package to make it easier to add cron jobs.

        The command seems to be /sbin/shutdown -p now
        Just add that as your command and root as the user like other jobs already in there.

        I haven't tested this though.

        1 Reply Last reply Reply Quote 0
        • J
          jamesdean last edited by

          Dont do a /sbin/shutdown -p now that just powers down the system.

          do a /sbin/reboot

          1 Reply Last reply Reply Quote 0
          • F
            focalguy last edited by

            You're right. I copied the line from a page where I found the full path for the shutdown command. I mean to change it to shutdown -r now which as far as I know will do the same as reboot but I may be mistaken.

            1 Reply Last reply Reply Quote 0
            • O
              orc4hire last edited by

              Yes, 'shutdown -r now' will do an immediate reboot.  You can replace 'now' with a number of minutes ('shutdown -r 5' for a reboot in five minutes, say) or an absolute time but you won't need that with a chron job.

              1 Reply Last reply Reply Quote 0
              • T
                Topell last edited by

                Why do you need to bounce the box every night?

                1U Pfsense Appliances.
                Topell <dot>com</dot>

                1 Reply Last reply Reply Quote 0
                • J
                  jdwilliams last edited by

                  @Topell:

                  Why do you need to bounce the box every night?

                  Just to try and keep things running smooth…

                  Its for a user whos 300 miles away and they have some slowness issues after squid has been runing for a few days and the webcon give a 500 error at random.

                  1 Reply Last reply Reply Quote 0
                  • ?
                    Guest last edited by

                    So you're slapping a horrible bandage on the problem rather than addressing it?

                    1 Reply Last reply Reply Quote 0
                    • O
                      orc4hire last edited by

                      @jdwilliams:

                      @Topell:

                      Why do you need to bounce the box every night?

                      Just to try and keep things running smooth…

                      Its for a user whos 300 miles away and they have some slowness issues after squid has been runing for a few days and the webcon give a 500 error at random.

                      Do you normally work with Windows?

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post