in reply to How to distinguish a crontab call and a web call

So my question is if it is possible to reliable distinguish - inside the script - if it was called by crontab or by HTTP request (some envs or something)?

For at least some definition of "reliable":

print "called from " . (exists $ENV{REQUEST_URI} ? "web\n" : "non-web\ +n");