Hi,
check the parent processes. It is started by cron if there is the cron
process in the process tree. The process ID of perl is $$.
Have a look on output of ps command to create the process tree.
But it could be that a command line option used for call by crontab is
easier to implement and easier to debug.
Torsten



                                                                                
                                                         
                    "Wong, Danny H."                                            
                                                         
                    <[EMAIL PROTECTED]>                      To:     
<[email protected]>                               
                    Sent by:                                 cc:                
                                                         
                    [EMAIL PROTECTED]        Subject:     Crontab               
                                         
                    eState.com                                                  
                                                         
                                                                                
                                                         
                                                                                
                                                         
                    02.11.2006 07:33                                            
                                                         
                                                                                
                                                         
                                                                                
                                                         




Hi Perl Gurus,
     Is there a way to tell if a Perl script has been run by the UNIX
cronjob instead of someone running the script manually from the command
prompt? Thanks!


     - - - - - Appended by Scientific Atlanta, a Cisco company - - - - -
This e-mail and any attachments may contain information which is
confidential, proprietary, privileged or otherwise protected by law. The
information is solely intended for the named addressee (or a person
responsible for delivering it to the addressee). If you are not the
intended recipient of this message, you are not authorized to read, print,
retain, copy or disseminate this message or any part of it. If you have
received this e-mail in error, please notify the sender immediately by
return e-mail and delete it from your computer.

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
  • Re: Crontab Torsten . Werner

Reply via email to