Howdy, y'all:
I want to run a script monthly. (update my dynamic DNS account) I (as 'root') ran 'crontab -e' and added this line:
5 6 7 * date /usr/local/src/ez/dyndns.conf >> /share/dyndnsup.txt 2>> /share/dyndnsup.txt
This seems to be the syntax indicated by 'man crontab'. If I understand the syntax of crontab, the above line will every 7th of the month, at 06:05, execute my dyndns.conf file and send standard and error messages to file /share/dyndnsup.txt.
Is this correct syntax?
Probably. I'm not familiar with the use of "date" as the fifth field (for day of the week), and I can't find it listed as an option in my man page, so I am not sure about that piece. I would write this entry ...
5 6 7 * * /usr/local/src/ez/dyndns.conf >> /share/dyndnsup.txt 2>> /share/dyndnsup.txt.
... with the last * indicating any day of the week.
Is there a syntax checker for crontab like testparm for samba?
crontab itself will inform you if any of the 5 time fields has an invalid entry, whenever you exit your editor (and it displays the "installing new crontab" message). crontab has no way fo knowing if the entry for what to run is valid or not.
- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs