[EMAIL PROTECTED] wrote:

> 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.

I think you could probably also use:

        if (-t STDIN) {
                # running from command prompt
        }
to check for a tty on STDIN.

> 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!
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
  • Re: Crontab Torsten . Werner
    • Re: Crontab $Bill Luebkert

Reply via email to