I don't see that this would be easier to maintain.
I suspect what you're saying is you have a lot you'd like to put in cron and want to do a simple edit session of a file rather than relying on crontab -e. If that's the case you can always just edit the cron file itself. (In fact I did this all the time before I found out about crontab -e.)
The cron files are in /var/spool/cron/crontabs. There should be a file with the name of the user that has cron entries. For most people the only one will be /var/spool/cron/crontabs/root.
I'd recommend saving the file before editing. Usually I do something like:
"cp -p root root.YYYYMMDD where YYYYMMDD" is current year, month and day.
After doing the edit just do "crontab -l" to verify cron sees the changes you made.
Of course you could just do your separate file and cat it into the end of the root cron file noted above:
"cat mycronfile >>/var/spool/cron/crontabs/root" to append to what is there
"cat mycronfile >/var/spool/cron/crontabs/root" to overwrite what is there.
Having said all that I'd say for most uses crontab -e is the way to go.
Last edited by MensaWater; 10-06-2005 at 09:23 AM.
|