Tag Info

New answers tagged


Instead of manually removing the safety filters like this, you should simply set the correct user for these processes to be running as. When you are logged in and running a process manually, you are logged in and thus you have your credentials being used, and your permissions being used. I'm betting you're an administrator on the site. You have permission ...


I am using crony now and it works very well. https://wordpress.org/plugins/crony/ With this cron one can easily set php file to fire or custom code on your own intervals. this instead of other plugins which helps you with setting the custom intervals rather the code and schedule itself. (plug and play - no code changes is required)


You should insert the validator, like this, so it will send only 1 mail in a day: $timeN = date('H:i'); $timeS = date('10:00'); if ($timeS == $timeN) { if (get_option('last_mail_sent_time')!= date('d')) { //your codes here //then update_option('last_mail_sent_time', date('d')); } }


Yes, you can make a plugin. Following is the way to add cron job functionality in WordPress plugin. http://codex.wordpress.org/Function_Reference/wp_schedule_event http://codex.wordpress.org/Function_Reference/wp_cron However, please note that this does not provide a real (system based) cron. It requires at least someone to visit your site, so that the ...


WordPress already has a cron style mechanism, wp_cron if ( ! wp_next_scheduled( 'my_task_hook' ) ) { wp_schedule_event( time(), 'hourly', 'my_task_hook' ); } add_action( 'my_task_hook', 'my_task_function' ); function my_task_function() { // do something } Ofcourse, what you do when the cron job fires is up to you. Your stated use for this is ...

Top 50 recent answers are included