I write wordpress plugin .. That plugin have function (Following code)..
I want run function with real Cron job no Wp corn
First I deactivate wordpress cron with follwoing code
define('DISABLE_WP_CRON', true);
Then add follwoing code to my host cron
wget -q -O - http://kharidsanj.ir/wp-cron.php?doing_wp_cron >/dev/null 2>&1
And Now I want run following function with real Cron job command
function import_into_db(){
////My code
}
How Can I?
If you are running wp-cron.php on host cron, Use the below code. It worked for me.