Jan 16 2014
Reboot Raspberry Pi every Sunday
I needed to restart my Raspberry Pi every Sunday at 11:56 pm, here is a quick howto.
Here is a link to a cron job script calculator if you don’t want to learn cron.
http://www.csgnetwork.com/crongen.html
Below are the steps I took
1. Edit
pi@rspi01:~$ crontab -e
2. Add the entry
56 23 * * 0 sudo /sbin/shutdown now -r
3. Exit and save
crtl+x
y
enter
3. Restart cron
pi@rspi01:~$ sudo /etc/init.d/cron restart
Restarting periodic command scheduler: cronStopping periodic command scheduler: cron.
Starting periodic command scheduler: cron.
Oct 28 2014
Rotate Apache log files they easy way
Here is how I configured access.log, ssl_request.log and error.log to rotate at midnight every day.
Put this below script in a file named rotateall.cmd and schedule a task to run at 12:00am every day.
Change the paths and service name to sute the setup.
By sysadmin • IT, Scripting • 0