KAYAK2U

May 24, 2013

I read it on the Internets

I'm working on a simple little coding project wherein I need to run a php script four times a day, which means a cron job, which I've never tried before.  I've also been interested (for the heck of it) in cutting down the excessive WordPress cron actions.  My websites don't need to check if their themes have been changed twice a day, or even once a week (though changing that behavior with the following is something else.)  And WordPress calls the cron action on every page access, which is somewhat silly, but that's how WordPress has to work, apparently.

So, it's simple to edit one's wp-config.php file with "define ('DISABLE_WP_CRON', true)", which, not surprisingly, unhooks the default WordPress cron behavior.

Then, to re-ignite a more periodically robust schedule, one is to utilize one's cPanel Cron form to rehook the wp-cron.php file.

However, according to my robust searches, the recommended command strings are… legion:

wget http://www.XXX.com/wp-cron.php
wget –q http://www.XXX.com/wp-cron.php -O /dev/null
wget -q -O – http://www.XXX.com/wp-cron.php >/dev/null 2>&1 
wget -q -O – http://www.XXX.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
wget -O /dev/null http://www.XXX.com/wp-cron.php
php -q /home/cPanel_User/public_html/wp-cron.php

Sweet.  (Or copacetic, perhaps, a word I vowed at one time never to utter, except, perhaps, sarcastically.)

It turns out that I need to do something different, anyway, but now that I can't unsee it, the ol' brain will have to chew the permutations for a while.

 

MikeSoja - May 24, 2013 -- 01:48 am    Filed in: Programming  
« Powerless waiting for the power
Dear Al Gore, »
As Happy As A Clam

Kayak2U.com

msoja RSS 2.0

Other's Pages









Search

Archive

November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  


  • Books4Sale



    Soja's GoodReads Books4Sale Cheap

  • Category Cloud


  • Tag Cloud