PHP - How to know if PHP script is being run via a Cron -
is there way can detect if script being run via cron job or via browser? there specific cron job http header or user agent?
edit: trying make script can run directly (via url) , can scheduled cron job. whenever executed, want detect if script being run cron job , stuff in condition.
there php_sapi_name()
function that
Comments
Post a Comment