Closed acoolov closed 4 years ago
Just noticed when I go to Settings - Mail Tools - Emails to send There is an email queue with all my workflow email notifications that are waiting there to be sent. Why are they not being sent when the action actually happens (in this situation new comment added on ticket)?
Looks like i need to enable cron. I thought processes that don't require schedule don't need cron but looks like in Yetiforce all workflow processes need cron enabled.
I'm trying to enable cron by reading this: https://yetiforce.com/en/knowledge-base/documentation/implementer-documentation/item/enable-cron
First i checked if cron service is running which it is. Then I edit nano /etc/crontab and add the following lines in the current cron file
/5 root sh /var/www/html/cron/cron.sh > /var/www/html/cache/logs/cron.log 2>&1 /5 root php /var/www/html/cron.php > /var/www/html/cache/logs/cron.log 2>&1 /5 * root cd /var/www/html; /usr/local/bin/php -f cron.php > /var/www/html/cache/logs/cron.log 2>&1
I changed the path for the first two lines to the correct path of my Yetiforce, but I'm not sure what to do with the third line. I'm currently using php 7.2 on Ubuntu 18.04.
Does anyone know how to modify the third line?
So far my cron is still not running. I'm not sure what else I am missing.
Please help.
I modified the third line by adding the correct path to my php7.2 executable file and here is how my 3 crontab lines are looking now:
/1 root sh /var/www/html/cron/cron.sh > /var/www/html/cache/logs/cron.log 2>&1 /1 root php /var/www/html/cron.php > /var/www/html/cache/logs/cron.log 2>&1 /1 * root cd /var/www/html; /usr/bin/php7.2 -f cron.php > /var/www/html/cache/logs/cron.log 2>&1
But cron is still not working. When I run this command manually sh /var/www/html/cron/cron.sh I get this output:
PHP Notice: Undefined variable: typeDb in /var/www/html/app/Db.php on line 153 --------------- 2019-11-07 21:11:01 | Start CRON ---------- 2019-11-07 21:11:01 | LBL_WORKFLOW - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_SCHEDULED_IMPORT - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_MAIL_SCANNER_ACTION - Start task 2019-11-07 21:11:01 | LBL_MAIL_SCANNER_ACTION - End task (0.03 s) 2019-11-07 21:11:01 | LBL_MAIL_SCANNER_VERIFICATION - Start task 2019-11-07 21:11:01 | LBL_MAIL_SCANNER_VERIFICATION - End task (0 s) 2019-11-07 21:11:01 | LBL_MAIL_SCANNER_BIND - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_MAILER - Start task 2019-11-07 21:11:01 | LBL_MAILER - End task (0 s) 2019-11-07 21:11:01 | LBL_CARD_DAV - Start task 2019-11-07 21:11:01 | LBL_CARD_DAV - End task (0.02 s) 2019-11-07 21:11:01 | LBL_CAL_DAV - Start task 2019-11-07 21:11:01 | LBL_CAL_DAV - End task (0.03 s) 2019-11-07 21:11:01 | LBL_ACTIVITY_STATE - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_SEND_REMINDER - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_SEND_NOTIFICATIONS - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_MULTI_REFERENCE_VALUE - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_CRMACTIVITY_DAYS - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_ASSETS_RENEWAL - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_SOLD_SERVICES_RENEWAL - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_RECORD_LABEL_UPDATER - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_PRIVILEGES_UPDATER - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_UPDATER_COORDINATES - Start task 2019-11-07 21:11:01 | LBL_UPDATER_COORDINATES - End task (0.01 s) 2019-11-07 21:11:01 | LBL_UPDATER_RECORDS_COORDINATES - Start task 2019-11-07 21:11:01 | LBL_UPDATER_RECORDS_COORDINATES - End task (0 s) 2019-11-07 21:11:01 | LBL_ADDRESS_BOOK - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_MARK_RECORDS_AS_REVIEWED - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_CACHE - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_NEVER_ENDING_RECURRING_EVENTS - Not ready to run as the time to run again is not completed 2019-11-07 21:11:01 | LBL_CLEAR_FILE_UPLOAD_TEMP - Not ready to run as the time to run again is not completed 2019-11-07 21:11:02 | LBL_SMSNOTIFIER - Start task 2019-11-07 21:11:02 | LBL_SMSNOTIFIER - End task (0.01 s) 2019-11-07 21:11:02 | LBL_BROWSING_HISTORY - Not ready to run as the time to run again is not completed 2019-11-07 21:11:02 | LBK_SYSTEM_WARNINGS - Not ready to run as the time to run again is not completed 2019-11-07 21:11:02 | LBL_BATCH_PROCESSES - Not ready to run as the time to run again is not completed 2019-11-07 21:11:02 | LBL_BATCH_METHODS - Not ready to run as the time to run again is not completed 2019-11-07 21:11:02 | LBL_SESSION_CLEANER - Start task 2019-11-07 21:11:02 | LBL_SESSION_CLEANER - End task (0.01 s) 2019-11-07 21:11:02 | LBL_CURRENCY_UPDATE - Not ready to run as the time to run again is not completed =============== 2019-11-07 21:11:02 (0.15) | End CRON ==========
Can anyone help?
@mariuszkrzaczkowski pls take a look for PHP notice in cron.sh output. Looks like variable name is wrong. @acoolov pls check google for correct CRON tuning and how it works. Usually there are should be only one line with command like this:
sh ...pathtosystem/cron/cron.sh > ...pathtosystem/cache/logs/cron.log
Correct path to php you need to put into cron/cron.sh
file
Something going wrong with you cron and this is cause of Not ready to run as the time to run again is not completed
messages
I used Yetiforce knowledgebase and followed their instructions on how to tune cron and it doesn't work. Looks like their instructions are not complete. Yes i put the correct path to php in my cron.sh file which is this in my case /usr/bin/php7.2
Anyone else knows what to do at this point?
Here is the variable from /var/www/html/app/Db.php on line 153
'typeDb' => $typeDb,
What should I do to fix it?
As Vladimir said you, try to set only one call into crontab file
/5 * www-data sh /var/www/html/cron/cron.sh > /var/www/html/yetiforce/cache/logs/cron.log 2>&1
www-data is apache user with read/write privileges in var/www/html folder don't use root user for security my example runs every 5 minutes
Here is my version_comment variable
version | 5.7.27-0ubuntu0.18.04.1 | | version_comment | (Ubuntu)
Here is my server configuration
you have a lot of serious errors in server configuration, you have to fix it without it, the system will not work properly. what is your database engine
It's MySQL
Hi mariuszkrzaczkowski,
Any update on the cronjob issue?
please find attached the requested server configuration
Hoop that you can solve this challenge :-)
Check the queue of e-mails to be sent after calling workflow with sending mail https://gitdeveloper.yetiforce.com/index.php?module=Mail&parent=Settings&view=List&block=8&fieldid=104
🐞 bug report
⁉️ Describe the bug
I've successfully configured smtp with a gmail account in the settings and when i saved, i successfully received a test email from Yetiforce.
Now when i enable a workflow for ticket comments to send notification when a comment is added to a ticket, i get no notification.
Am i missing any other piece of configuration or is it supposed to work since i received the test email from the system when configured smtp?
🔥 How to trigger the error
Configure smtp with gmail. Got a test email sent successfully to my email. Enabled workflow for ticket comments so that when a comment is added to a ticket, it will send email notification to ticket owner.
👎 Actual Behavior
Not sending email notification to ticket owner.
👍 Expected Behavior
Should send email notification to ticket owner.
Yetiforce 5.2.0 with the latest service pack. PHP requirements have been met during installation.