[plug] Crontab??

Jay Warwick jtwarwick at iinet.net.au
Wed Jul 28 07:13:14 WST 2004


On Wed, 2004-07-28 at 06:59, Denis Brown wrote:
> Dear Jay,
> 
> On Wed, 28 Jul 2004, Jay Warwick wrote:
> 
> > On Tue, 2004-07-27 at 20:38, James Devenish wrote:
> >
> > > Also, note that it might not be a good idea to attempt a "long-running"
> > > cron job. If you test the above and it works, you might then choose to
> > > change it to this in future:
> > >
> > > 00      21      *       *       fri          env DISPLAY=:0 firefox &
> >
> 
> <snip>
> 
> > be run instead. This brings me to my question - on the last line above,
> > what is the meaning of the '&', does it allow the job to stay open for a
> > longer period?
> >
> The & at the end of a command line causes the command, once initiated, to
> be sent "to the background" for continued execution.   The means, for
> example, that you can start a long job, then log off without the job
> stopping (because you logged off.)
> 
> Thus you might have an hypothetical job "calculate pi to 10,000,000
> decimal places" that will probably take quite some time to complete.   If
> you did
> 
> myprompt> calcpi
> 
> and then logged off, the job would collapse.   On the other hand if you
> added the & character
> 
> myprompt> calcpi &
> 
> you could safely log off, log back on in a week's time and check on
> progress :-)   To return a job to the foreground, type fg and the job
> number.   The job number can be found by using the jobs command.
> 
> I have a feeling that man bash givs more details, alterntively consult
> something like the bash howto (Linux Documentation Project) or the Linux
> Admnistrator's Guide (also Lin Doc Proj)
> 
> Hope this helps,
> Denis

Thanks Denis,

Not sure if this means I need to be logged on to be able to start the
job - root job scheduled to start at 4am, but your info gives me more to
look into.

Thanks
JW




More information about the plug mailing list