|
Posted by Toby A Inkster on 06/05/07 17:39
Jon Slaughter wrote:
> I assume this is bash stuff? (I haven't done any unix scripting in a very
> long time and very little but I assume the other posts give the script that
> will work here). I just remember there being several types
Cron doesn't specifically require bash scripting.
Cron can be used to launch any executable file at a frequency of up to
once per minute. (Or as infrequent as once every 28 years[1] if need be,
but that seems a bit excessive -- if something needs scheduling that
infrequently, you're better off running it manually.)
These executables could be bash scripts, tcsh scripts, Perl scripts,
compiled C code, or raw machine code written in a hex editor if you
like -- anything that you could run from the command line can run from
cron.
That said, most people do seem to use either Perl or some form of shell
scripting for cron jobs.
____
1. Cron users may not believe this, as cron tabs only allow you to specify
minutes, hours, days and months, so it's not clear how to schedule a job
to happen once every 28 years. Technically, you can't, but you can
approximate it by scheduling the job to happen on Sunday 29th February, a
date which only occurs (on average) every 28 years, because of leap years
and the fact that there isn't an integer number of weeks in each year.
Under normal usage, the longest time between cron jobs is 1 year.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 102 days, 1:16.]
URLs in demiblog
http://tobyinkster.co.uk/blog/2007/05/31/demiblog-urls/
Navigation:
[Reply to this message]
|