Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I am using Advance Cron Manager in wordpress for cron, but my cron removes after some time 24-48 hours, I am unable to detect what causing this. I have checked the code and paseted below from my custom plugin. I am using whatsapp chat-api to detect if there is new message received/sent to whatsapp, I am using emails to sent whatsapp message once new email is sent with certain headers, it will hit below function and sent message to whatsapp.
To check this I have scheduled a cron new_email_event after every 1 minute, sometimes it workes ok but some time it removes after 10 minutes.
new_email_event
I want to know is this an issue with plugin or I am missing something.
https://bracketspace.com/downloads/advanced-cron-manager-pro/
This is code written in my custom plugin.
add_action('new_email_event', 'identify_new_email_received'); function identify_new_email_received() { ini_set('display_errors', '1'); $settings = odz_get_whatsappsmtp_settings(); include(dirname(__FILE__).'/src/PhpImap/__autoload.php'); $hostname = '{imap.gmail.com:993/imap/ssl}INBOX'; $username = $settings['configured_email']; $password = $settings['email_password']; $mailbox = new PhpImap\Mailbox('{imap.gmail.com:993/imap/ssl}INBOX', $username, $password); //$mailbox = new PhpImap\Mailbox('{imap.gmail.com:993/imap/ssl}INBOX', $settings['configured_email'], $settings['email_password'], __DIR__); $since_date = date('Y-m-d',strtotime("-1 days")); $mailsIds = $mailbox->searchMailbox('SINCE "'.$since_date.'"'); if(!$mailsIds) { my_custom_log('No emails'); } $email_data = array(); if(!get_site_option('wp_last_email_time')){ my_custom_log('No last email'); //whatsapp the last email $latest_mail = count($mailsIds) -1; $mail = $mailbox->getMail($mailsIds[$latest_mail]); $email_data['date'] = $mail->date; $email_data['text'] = $mail->textPlain; $email_data['id'] = $mail->id; $email_data['subject'] = $mail->subject; $email_data['fromAddress'] = $mail->fromAddress; $email_data['fromName'] = $mail->fromName; $sender = get_sender_number($mail->textHtml); $msg = get_sender_message($mail->textHtml); if(!empty($msg)){ $email_data['text'] = $msg; } if(!empty($sender)){ $mailbox->deleteMail($mail->id); REPLY 0 views 0 likes 0 shares Facebook Twitter Linked In WhatsApp
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.