Yes. The file that gets submitted to crontab is simply a *nix text file; if you’re at all familiar with handling serial access files it shouldn’t represent much of a fuss.
[quote]I’m working on project that allows users to create schedules in order to have specific information sent to them at specific times. The two methods I’m looking at to do this are:
- when the user schedules a send-time, it is entered into the crontab, which will run the proper script at the proper time. This is the thing where I don’t know if it will work, since I haven’t found any information on dynamic automated crontab editing.[/quote]
Again, the file you submit to crontab is just a (mildly formatted) text file. The catch with crontab is that submitting a file to the cron daemon for tabbing isn’t cumulative; every time you add a new job you have to re-create the entire file and re-submit it (IOW, you can’t just append the crontab).
Actually, it’s exactly that sort of repetitive procedure that computers are real good for.
It’s possible, but probably not so very desirable. Fiddling with the cron daemon on a semi-constant basis may cause some nuisance, especially if two users are trying to read or write to the crontab file at the same time. Your second method of using the cron daemon to periodically check a multi-user accessible database for some timed event is probably the best and safest way to go. From an administrative point of view, it’s much easier to pinpoint a problem in a database than to sift through (what might potentially be) a bulky textfile full of cron entries.