I have a crontab php script that resides in one of the folders on abc.tld. The problem is that the script could also be fired by calling it directly (i.e. http://abc.tld/crontab.php) To eliminate such possibility, I assume, I could do something like
if( isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR']) )
die( 'Never gonna happen!' );
But what is the right way? (except .htaccess)
Crontab entry:
0 12 * * 1 /usr/local/bin/php /home/pavellebedev/public_html/abc.tld/wp-content/plugins/easy-timesheet/kernel/cron/ezts_timesheet_notifications.php