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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -