WP plugin/ cron help please

by zurich
8 replies
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?
#cron #plugin or
  • Profile picture of the author mywebwork
    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
    {{ DiscussionBoard.errors[3024251].message }}
    • Profile picture of the author zurich
      [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
      {{ DiscussionBoard.errors[3024281].message }}
  • Profile picture of the author pomspot
    Originally Posted by zurich View Post

    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?
    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}
    {{ DiscussionBoard.errors[3024317].message }}
    • Profile picture of the author zurich
      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
      {{ DiscussionBoard.errors[3024355].message }}
      • Profile picture of the author pomspot
        Originally Posted by zurich View Post

        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?

        ht-tp://xxxx
        ht-tp://yyyy
        ht-tp://zzzz
        Put in multiple cronjobs and schedule them a few minutes apart at least. Specially if all these blogs/domains are on this host!

        It is good practice to know when other things are running like daily backups and not schedule multiple tasks at the same time.

        As has been stated there are many ways to set this up. This may not be the "best" but it is simplest I think.
        {{ DiscussionBoard.errors[3025922].message }}
    • Profile picture of the author CrhisD
      Originally Posted by pomspot View Post

      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}

      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" )
      {{ DiscussionBoard.errors[3024471].message }}
      • Profile picture of the author pomspot
        Originally Posted by CrhisD View Post

        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 "/whatever.php" )
        I Agree though I am sure that was easier to explain.

        I use it for simplicity and to easily pass values but many wordpress users should be concerned about resource-use and the resulting impact on their sites load times.
        {{ DiscussionBoard.errors[3025874].message }}
  • Profile picture of the author SpamHat
    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
    {{ DiscussionBoard.errors[3029254].message }}

Trending Topics