crontab
I am trying to make a crontab that will log my Linux uptime each day.
It looks something like 30 22 * * * /usr/bin/uptime &> /var/log/uptime.txt This should log @ 10:30 PM my PC uptime in the uptime.txt file, right? I googled for answers and can not find anything, hoping someone here can help. It did not seem to work, I was told that it would auto build the TXT file as well. Any input would be just great. Thank you, Joe |
This is what I would do, instead vi(or what ever you use to make a text file) a file and call it something like "cron.uptime"
30 22 * * * /usr/bin/cron.uptime >> /var/log/uptime.txt You dont need the & in there. and then in command line type: # crontab cron.update and then it should run The problem you might be having is that you did not make this crontab as root, and you wouldnt have permissions to write /var/log/ So either make this crontab as root, or make it write to somewhere else :) |
Quote:
Thank you, Joe |
System issues caused this not to work.
Reinstalling system with Fedora Core 3 |
All times are GMT -5. The time now is 06:58 PM. |