• Resolved Wendihihihi

    (@wendihihihi)


    Hi,

    I’m posting 1 post once a day, always at the same time. Right now, the cron job for rop is set to 1 minute. Those are way to many cron jobs for my site because it’s starting to slow down the site (limits by host).

    How can I change the cron job frequency to let’s say twice a day?

    Thanks
    Wendi

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Uriahs Victor

    (@uriahs-victor)

    Hi, the scheduled cron task set by the plugin is ran every minute to check if there are posts to be sent out at that time in the day.

    It’s not an actual server cron job, its a scheduled task inside WordPress, which gets ran when your WP Cron(also not a server cron job) is hit.

    If you update the cron task to run every 30 minutes for example, and you have a post which is due to go at 9:00pm, that post might be set at instead 9:30pm or later than that depending on if your WP Cron works fine and if your site is getting active traffic. In that case we recommend creating a true cron to control how many times you’d like your cron to be hit, see here: https://docs.revive.social/article/686-fix-revive-old-post-not-posting

    Going back to your original question, you can create a quick plugin, using this plugin: https://www.ads-software.com/plugins/pluginception/ and then add the code below to change the ROP scheduled task to whatever value you like (Be sure that the plugin is activated after you create it, by checking your plugins area)

    function update_rop_scheduled_task(){
        
      $schedules['5min'] = array(
    			'interval' => 10 * 60,
    			'display'  => 'Once every 10 min', 
    		);
    
    		return $schedules;
        
        }
        
    add_filter('cron_schedules', 'update_rop_scheduled_task', PHP_INT_MAX);

    You can change the 10 to a higher value, to increase the number of minutes.

    Thread Starter Wendihihihi

    (@wendihihihi)

    Thank you, Victor, for the clear explanation. I’m going to change it to 30 minutes and see if there are any changes. But like you said, if those are not server cron jobs it might not make a difference.

    One thing I noticed was that when I changed the interval to

    'interval' => 1 * 3600, manually inside the plugin code (I know it’s not the right way to do it…) CPU resources were limited on my site anymore. I don’t know why.

    I’ll see how it goes with the code above.

    Thanks

    Plugin Contributor Uriahs Victor

    (@uriahs-victor)

    Sure, let us know how it goes

    Thread Starter Wendihihihi

    (@wendihihihi)

    Here are the results. I changed two things:
    1. Used the code above and changed the interval to 30 minutes
    2. Deleted WP Super Cache and installed Litespeed Cache

    https://imge.to/i/vFIURm

    I changed the plugins before the last fault and changed the code just after the last fault. It’s probably Litespeed Cache that made the difference, but I’m happy now.

    There’s one thing though, it’s not posting to Twitter anymore. The logs say that there was a successful post to Facebook but Twitter wasn’t mentioned. I’ll have my next post in 3 hours time. I’ll see how that goes.

    Thanks

    Plugin Contributor Uriahs Victor

    (@uriahs-victor)

    @wendihihihi Can you make sure you twitter account is active in the Accounts area of ROP? Please also check if the sharing queue shows any twitter posts scheduled.

    If it does and twitter posts are still not going through then please try disconnecting your twitter account and reconnecting it to see if that fixes the issue, I’d also recommend clearing your caches as you mentioned switching cache plugins.

    If the issue still occurs then please send us a support ticket here: https://revive.social/direct-support/

    Thread Starter Wendihihihi

    (@wendihihihi)

    Thanks Victor,

    “disconnecting your twitter account and reconnecting it” did the job.

    Plugin Contributor Uriahs Victor

    (@uriahs-victor)

    Awesome! I’m glad we could help.

    If you have a second, would you mind leaving us a review here?:

    https://www.ads-software.com/support/plugin/tweet-old-post/reviews/?rate=5#new-post

    We would really really appreciate it if you haven’t already! It greatly helps us improve ROP and make it the best social media automation tool for WordPress.

    Thank you for your time and support.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Change frequency cron jobs’ is closed to new replies.