WP plugin/ cron help please

by 8 replies
10
I'm using a WP plugin called stealth traffic system.
It auto posts content to other blogs for backlinks.

It only posts content when two conditions are met:
1. there is a unique visitor to the site
2. The "posting delay" has passed (admin configurable)

From what I've read, it uses wp cron in some way to do this.

So my question is this: is there any way to force it to post each and every day, regardless if the site gets a visitor or not, by using some sort of cron command?
#programming #cron #plugin or
  • Short answer - no!

    WP-CRON is a "pseudo-cron" application, and it works exactly as you described. If no one visits the site then wp-cron never fires.

    The only way to get true CRON operation is to really use a cron job.

    Bill
    • [1] reply
    • [QUOTE=
      The only way to get true CRON operation is to really use a cron job.

      Bill[/QUOTE]

      Is there a specific cron job then that would either simulate a visitor to the site or force the plugin to fire?

      Thanks
  • Yes you want to setup a cronjob using cURL or wget to load your blog URL once per day.

    This would look like this in your crontab (to run at 3AM):

    0 3 * * * /usr/bin/curl -s {URL} >/dev/null 2>&1

    {URL} = Enter the entire url to your blog homepage from the address bar of your browser starting with http...

    In CPanel you have a place to update crontab. The "command" to use is:

    /usr/bin/curl -s {URL}

    Note: The "-s" is important and means "silent" otherwise it will write the file returned to your server every time it runs.

    You can also try "wget" if cURL is not available:

    /usr/bin/wget -q {URL}
    • [ 1 ] Thanks
    • [2] replies
    • thanks- great info. I'm using this plugin on about 30 blogs. when using your recommend command, if I wanted to trigger the plugin on multiple URLs, would I have to create separate commands, or could I place all of the URLs in just one? If so, would they be line by line, like this?

      http://xxxx
      http://yyyy
      http://zzzz
      • [1] reply

    • It's usually faster (and less resource-intensive) to use a local reference instead of a URL (Eg "/home/(user name here)/public_html/whatever.php" instead of "www.mydomain.com/whatever.php" )
      • [1] reply
  • If you don't want to set cronjobs up across multiple servers and worry about managing them all, try something like this: FREE Cron Jobs - Reliable Web Cron service - Set Cron Job PHP

Next Topics on Trending Feed