New answers tagged wp-cron
If you have important WP cron jobs on a schedule you should of course have a system cron job running that regularly calls WP cron to make things are always fired when you need them. If you need a specific time/date for your WP cron runs you can always schedule a single event and have the called method schedule the next event. Simple example: function ...
Apparently, WP-Cron jobs are run in a separate process. This can raise some issues, but at least the answer to the question above is: yes, a time-consuming action can be scheduled with WP-Cron. The triggering HTTP request won't be delayed because of it.
This one is actually surprisingly simple; add this to your wp-config.php file and all automatic updates will be blocked when outside of the specified hours: // Suspend updates when outside of business hours, 9:00 AM to 5:30 PM $updates_suspended = (date('Hi') < 0900 || date('Hi') > 1730); define( 'AUTOMATIC_UPDATER_DISABLED', $updates_suspended ); ...
You are using the system cron to trigger a function hooked into the AJAX API, not, as your title reads, using "admin-ajax.php to run a real cron job". You are doing exactly the opposite of what you wrote in the title (I'd advise editing that). Yes, that is perfectly fine. I have advised using the same technique in fact. All you are doing is making a ...
Top 50 recent answers are included