Re: ksh script question



Title: Message
It might not be appropriate for your particular needs, but one simple alternative if this is a script running continuously at regular intervals is not to use crontab.  Instead, start it from inittab and then when the script completes simply have it call itself again, possibly after sleeping for a while.  Or put the whole thing in an endless loop.

--

Simon Green                                                                          
Altria ITSC Europe s.a.r.l.


AIX-L Archive at https://new-lists.princeton.edu/listserv/aix-l.html

New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX

 

N.B. Unsolicited email from vendors will not be appreciated.

Please post all follow-ups to the list.

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of Mark Schlechte
Sent: 26 January 2006 19:40
To: aix-l@xxxxxxxxxxxxx
Subject: ksh script question

If I have a script scheduled via cron how do I check to see if it is already running and therefore not run it a second time?
 
TIA, Mark
DISCLAIMER: The information transmitted is intended only
for the addressee and may contain confidential,
proprietary and/or privileged material. Any
unauthorized review, distribution or other use
of or the taking of any action in reliance upon
this information is prohibited. If you received
this in error, please contact the sender and
delete or destroy this message and any copies.

As of January 20, any e-mails addressed
to "cityregina.com" will not be delivered.


Relevant Pages

  • Re: GPG in crontab causes blank messages
    ... When I run my crontab command manually in terminal, ... But since the output of the script contains a big list of files, ... If I remove the GPG portion of the command, ...
    (comp.sys.mac.apps)
  • Re: [kde] Clock
    ... In FreeBSD you ask crontab to do your script any ... Account management: ... crontab, a tiny shell script, ... Archives: http://lists.kde.org/. ...
    (KDE)
  • Re: [kde] Clock
    ... I thought Linux + FreeBSD were close enough. ... In FreeBSD you ask crontab to do your script any minute of the ...
    (KDE)
  • Re: syntax problem with cron
    ... > now when it does it, you just edit the script. ... > in a crontab entry often just winds up with an unreadable crontab entry. ... seconds until it executes the freshclam process. ...
    (Fedora)
  • SUMMARY: cron entry: nth day of every month?
    ... cron can not handle this with its own syntax. ... 21st but "command" only runs if the output of the "date" command ... What I would suggest is rather than embedding the logic in each script ... The answer is it is _not_ possible to control it only with crontab ...
    (Tru64-UNIX-Managers)