I created my wordpress plugin and running work well when I use via any browser ex. http://mysite/wp-content/plugins/my-plugin/my-file.php?cron=do
But I need to execute same file via cronjob I'm using setcronjob.com to execute but file not execute.
this is my code
<?php
require_once (dirname ( __FILE__ ) . '/../../../wp-config.php');
nocache_headers ();
if (isset($_REQUEST['cron'] == "do")){
require_once (dirname ( __FILE__ ) . '/sample.php');
cron_exc();
}
?>