PDA

View Full Version : Crontab Questions



Stealth
4th July 2007, 08:07 PM
A couple questions about Crontab...

1) What is the proper syntax for @reboot with F7?

2) How can I back up user crontab files?

sentry
4th July 2007, 08:37 PM
#1. not sure if that's a cron question.

#2. crontab -l -u <USERNAME> > crontab.backup.txt

sairam
5th July 2007, 04:07 AM
For rebooting,

# shutdown -r now

now means at this instant, you can also specify the time here, `man shutdown` for more info about shutdown

$ reboot

if its as a normal user. Shutdown wont work unless you give permissions for users or add an entry in /etc/sudoers.

sairam
5th July 2007, 04:16 AM
and found the solution for the 2nd question also,

All the users crontab files are located in /var/spool/cron/ directory.

Hope this helps

Stealth
5th July 2007, 07:00 AM
Not asking how to reboot, but what is the proper syntax for crontab @reboot.

I'm not a noob, just having syntax issues

Stealth
5th July 2007, 07:01 AM
and found the solution for the 2nd question also,

All the users crontab files are located in /var/spool/cron/ directory.

Hope this helps

Sweet, that helps more than pulling it from the crontab output. Thanks