Periodic execution of a program

Paul Falstad pfalstad at phoenix.Princeton.EDU
Thu Jan 24 14:37:18 AEST 1991


rawdon at rex.cs.tulane.edu (Michael Rawdon) wrote:
>I'm trying to get a program to run on a daily basis, at the same time each
>day (more or less).  Being just a normal user, I don't have access to
>crontab.  

On our system, at least, there is a command called 'crontab' which lets
ordinary users submit crontabs to be run by cron.  Do a "man 1 crontab".

			 I was investigating a function called 'at', but it doesn't seem
>to be quite what I want.
>From the man page, it appears that at will only execute something once,
>not every day.  I infer this from the fact that the man page doesn't explain
>how to turn at off!

at -r <jobnum> will remove a job from the queue, and at -l will list
the current jobs.

>I was wondering if it would be possible to execute at recursively, that is,
>have the file that at executes call at again to execute the same file at
>the same time the next day.  I'm not sure if this would be possible.

Yeah, exactly.  If the crontab doesn't work, try this:

% cat /tmp/bar
foo | sort | mail foo at bar.Berkeley.EDU   # do stuff here
...
at now + 1 day /tmp/bar  # reschedule job
% at (whenever) /tmp/bar
job 64918 at Wed Jan 23 22:37:00 1991

at will execute /tmp/bar every day.

--
Paul Falstad, pfalstad at phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD
In the heat of composition I find that I have inadvertently allowed
myself to assume the form of a large centipede.  I am accordingly
dictating the rest to my secretary.
409 shift/reduce, 62 reduce/reduce conflicts.  Beat that!



More information about the Comp.unix.questions mailing list