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

    Automatic schedule for shut down

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 4 Posters 2.3k 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.
    • S Offline
      spflipper
      last edited by

      Hi @,
      is it possible to set an automatically schedule for shut down the server?

      Regards

      1 Reply Last reply Reply Quote 0
      • C Offline
        cmb
        last edited by

        To power off? Add a cron job (see cron package) to run 'shutdown -p now' at the time you want to power off.

        1 Reply Last reply Reply Quote 0
        • S Offline
          spflipper
          last edited by

          sorry "shutdown -p time"
          -p a schedule every day at time indicate?

          1 Reply Last reply Reply Quote 0
          • M Offline
            muswellhillbilly
            last edited by

            The cron job sets the time itself - the shutdown will run when the cron job kicks off. (eg: 0 5 * * * /root/batch.sh - this will run the 'batch.sh' script at 5am every day). See the following link for the correct syntax: http://www.computerhope.com/unix/ucrontab.htm

            1 Reply Last reply Reply Quote 0
            • D Offline
              doktornotor Banned
              last edited by

              There's a Cron package with GUI. Would probably be less error prone, plus permanent.

              1 Reply Last reply Reply Quote 0
              • C Offline
                cmb
                last edited by

                @doktornotor:

                There's a Cron package with GUI. Would probably be less error prone, plus permanent.

                Yes, use that to create it.

                @spflipper:

                sorry "shutdown -p time"
                -p a schedule every day at time indicate?

                Just run exactly "shutdown -p now" with cron at the time you want to shut it down. Cron controls the time, just let the shutdown run 'now'. The -p tells it to power off the system.

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