Support » Plugin: WP Telegram (Auto Post and Notifications) » Multiple schedules overlapping, single item in ‘queue’

  • Resolved Daniele Muscetta

    (@dani3l3)


    If you post MULTIPLE (2 is enough) POSTS within 5 minutes (system cron’s smallest interval) each last one replaces the previous one in the wptelegram_p2tg_delayed_post hence only the last post makes it to telegram… like you have a queue of only ONE ID ? Am I right?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Manzoor Wani

    (@manzoorwanijk)

    That happens if the same post is scheduled again. If the two posts are different, they will seperately be scheduled without replacing the first scheduled.

    Thread Starter Daniele Muscetta

    (@dani3l3)

    So you would create two tasks, one for each? I am not sure what the customer did exactly… I believe one post was scheduled and one was published manually within the same 5 minutes interval (can’t remember in which order), but I could only see the task created for tha last one (the most recent one of the two), I’ll see if I can repro… maybe on the manual one they had that other flag to post to telegram turned off… thanks.

    Thread Starter Daniele Muscetta

    (@dani3l3)

    You are right or does work. I was just able to see it handle even 3 in an interval. I think the customer had messed up with the options and the second post was indeed manual… apologies for the randomization, we are getting used to the options available 😄

    Thread Starter Daniele Muscetta

    (@dani3l3)

    One more case… the user says the “post to telegram” flag was enabled when publishing post 77693 in the log below… and it seems it has been honored with ‘delayed 2’, right? At the same time also 77694 was being inserted (this is still in draft atm), see?

    [2020-02-04 10:00:09]
    {“77694-inherit”:[{“hook”:”before”,”trigger”:”wp_insert_post”},{“hook”:”sv”,”validity”:712},{“hook”:”finish”,”ok”:false,”processed”:[]},{“hook”:”after”,”result”:433}],”77693-publish”:[{“hook”:”before”,”trigger”:”wp_insert_post”},{“hook”:”rules”,”apply”:true},{“hook”:”finish”,”ok”:false,”processed”:[]},{“hook”:”after”,”result”:”delayed 2″}]}

    But then, in the bot-api log, there is no trace whatsoever of 77693.

    I was not present at that specific moment to look what was in cron… but something went wrong…. what else do I look at?

    Plugin Author Manzoor Wani

    (@manzoorwanijk)

    In case of drafts, the log entry will still be created, this is normal, but they won’t obviously be sent to Telegram, thus no entry in bot API log.

    Plugin Author Manzoor Wani

    (@manzoorwanijk)

    If there is no trace of the delayed post, that means the cron was messed up or didn’t run. I always recommend to use real server cron instead of relying on site hits for WP Cron to work.

    Thread Starter Daniele Muscetta

    (@dani3l3)

    We do use server cron, it triggers every 5 minutes. Here in that log snippet, at 10:00 am, you see it saw 2 posts: one is a draft, sure; the other one is being published manually and flagged for “send to telegram”, which should have created the “delayed” cron event for 10:02. Which of course will get kicked off at 10:05. I wasn’t there to witness the 10:05 cron’s execution unfortunately but at 10:15 or 10:20 is when I looked at the logs and saw what I described…. this is a busy site with hundreds of posts each day… I am trying to observe it closely but it all works until I turn around for a few minutes and it breaks of course at those moments only. For the customer it just boils down to “it misses posts”. Now, in several cases and other errors, I was able to train them to use the right format for images, I increased the timeout, etc…. they are having troubles to understand the “post to telegram” flag (they need to remember to turn it on when publishing, turn it back off if updating… this is already a usability mess) but I can let that fall into the “user error” category. But this one occurrence of the log above sounds different to me.

    Plugin Author Manzoor Wani

    (@manzoorwanijk)

    I will try to handle those differently. Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multiple schedules overlapping, single item in ‘queue’’ is closed to new replies.