How can i set rule in pfsense for rebooting
-
As heper said. Check out the cron package.
Or if you'd rather not install the cron package manually add the shutdown -r now command to /etc/crontab.
http://www.freebsd.org/cgi/man.cgi?query=crontab&apropos=0&sektion=5&manpath=FreeBSD+8.3-stable&arch=default&format=html
http://www.freebsd.org/cgi/man.cgi?query=shutdown&apropos=0&sektion=0&manpath=FreeBSD+8.3-stable&arch=default&format=html
-
It is not clear to me if the question is about shutting down and immediately restarting OR about shutting down and then restarting sometime later, for example, shutdown at midnight and startup at 7AM. I think the latter would need to be done in the BIOS
-
If you just want to schedule 1 reboot or shutdown, then you can do the /etc/crontab editing. Because pfSense creates /etc/crontab again when it boots, your entry will be gone - which might be exactly what you want.
The command for reboot is:shutdown -r now
The command for shutdown and stop (halt) is:
shutdown -h now
If you halt, then you need some other way to start again later - wake-on-LAN from another box if your hardware supports it, or press the power button.
If you want a regular reboot or halt, then you have to install the Cron package and use the GUI to add a job to do the command at the regular times you want it. -
yes i need shutdown and work againg automaticly just for second but want this happed every 5 hour
-
shutdown -r +300 & ```will reboot the system 5 hours (300 minutes) later. If the command is issed at boot time, the system will reboot about every 301 oder 302 minutes (300 minutes plus the time required to boot up). http://doc.pfsense.org/index.php/Executing_commands_at_boot_time Since only one day in the year has 25 hours, an "every 5 hours" approach with cron might be a bit more tricky.
-
To get around the issue of cron being recreated at boot time mentioned by Phill.Davis. An entry can be added to the pfSense /cf/conf/config.xml cron section so it is included in the boot time recreated /etc/crontab.
-
A question here is: Why do you want to reboot your pfSense box every 5 hours?
I haven't rebooted even my home box for months.Steve
-
-
Ok, you got me, I last rebooted it when I upgraded to 2.0.2. Still more than two months ago though. ;)
Steve
-
im sory for late
because i have mulitgatway , if i restart my two router just only one router conected -
in stutes tab - gatwy - see one router is online and the another one is ofline , but after reboot my pfsense both of them is online -
You shouldn't have to do that. How are you connecting to the two routers? DHCP? PPPoE bridge?
However to sum up the above advice:
- Install the crontab package.
- Use the crontab package to set the command 'shutdown -r now' at 5 hour intervals.
Steve
-
**my system work on ESXI 4.1 , pfsense for merge 2 line my multigatwy then go to Mikrotik 5.20 for Distribution internet to clients ,
every route have bult in siwtch take cable form router 1 to router 2 and from router 2 cable to wan , ( i disable dhcp in bothe of them ) ( in ESXI creat 2 virual network adapter in pfsense , contact to wan by creat virtual switch then acreat vm switch btween mikrotik an pfsensethis is my network every time restart my Routers only one is online and the other is offline to solve problem need to restart pfsense every time after restart routers , hop to fond solutoin**