in reply to How to distinguish a crontab call and a web call
/opt/perl /home/www/cgi-bin/myscript.cgi CRON
If the crontab runs under a different user than the webserver, you can check $>.
But the best solution would be to put the common code into a module and use it from two different scripts, one running from crontab and one running in the webserver.
|
|---|