send email workflow very slow

In our SuiteCRM Instance, we mostly use Contacts, Accounts, and Cases. We are an IT company whose clients use AOP to create cases, or the techs create cases themselves.

We need only one workflow at the moment, which is to send an email upon case creation (to four specific email addresses).

Email is set up fine, but the issue is when the workflow kicks in. In both the Joomla Portal and in the Cases module, when a case is created and you click “SAVE” it takes between 40 and 80 seconds to resolve. This causes confusion with the contacts who think the link is broken, and wastes time for the techs creating cases in the Cases module. As soon as I set the workflow to “Inactive” the problem is gone, and it only takes 4 to 6 seconds to create a case, but it is very important to send these emails.

I’ve been having this issue for weeks, with countless hours researching and troubleshooting. If there is another thread addressing this issue that I missed, please point me to it. Otherwise, any help will be greatly appreciated.

Thank you

Can you share a screen shot of your workflow? have you tried to set the run only on scheduler? my guess is that you have set in only on save, and it waits for the mails to be sent then refreshes the page

best regards

1 Like

It’s not set to only on save, but it does seem like it waits for the emails to be sent. Is there any other setting that would cause this?

Here are the screenshots; I normally would have 4 different emails but took out all but mine for testing purposes.

Change the Run: Always to Run: Only on Scheduler and test it, Always means always and of course Run on: New Records

best regards

1 Like

Set to only on scheduler
Set to active
Created a case - <4 second completion time
No email sent
Nothing in process audit

Have you waited the 1 minute for the cron to execute?

Best regards

Yes, it’s been an hour now

Is there a place I need to set how often it runs?

Yes, in Admin, Schedulers there should be something like AOW Process

Best regards

Yeah I found it, Job Title is Process AOW Workflow

It’s set to every 1 minute on every day.

p.s.
Thank you for your quick responses

Yeah I found it, Job Title is Process AOW Workflow

It’s set to every 1 minute on every day, so that’s not the issue.

Email still aren’t being sent. Does the workflow look like it’s set up correctly?

p.s.
Thank you for your quick responses

I just test this and is working for me with less than a second to create the case, and of course I get the emails after 1 minute or less, depending on when the cron gets executed

Try to create a simple workflow that doesn’t necessarily sends an email, and just make sure is working for you

best regards

What if the workflow triggered a number of minutes after case creation?

How would I do that? Is it possible?

I created a workflow that would create a call on case creation.

It’s been 20+ minutes and nothing has happened.

It seems to me my scheduler/cron isn’t working for some reason.
Here it is;

Expand the subpanel “job logs” to see if your cron is getting executed. Do you have your cron configured correctly?

best regards

There is no data in the Job Logs.

I really can’t say if the cron is configured correctly, I’m still somewhat new to all of this.
Can you tell me how to check that or direct me to instructions?

Our site is hosted locally with WAMP Server running on Windows 10. SuiteCRM is installed inside the www directory within joomla. So we go to ourdomain.com/suitecrm

I just noticed this at the bottom of the schedulers list:

“Note: In order to run the SuiteCRM schedulers, create a batch file to run using Windows Scheduled Tasks. The batch file should include the following commands:
cd C:\wamp64\www\SuiteCRM
php.exe -f cron.php”

So I assume that’s my problem. I’ll work on it, and update later today

Yes, I just was about to highlight that

best regards

1 Like

Ok I finally got around to building the batch file, and created a scheduled task to run it at startup (is that the way to go, or should it be every minute like the scheduler?).

Batch file contains:
cd C:\wamp64\www\SuiteCRM
php.exe -f cron.php

However, just to test it, I opened an administrator command prompt and ran the batch file, and got this error:
“php.exe is not recognized as an internal or external command, operable program, or batch file.”

I assume that a php.exe should be in the SuiteCRM folder, but there isn’t one anywhere. There is, however, a cron.php

I found it a php.exe in C:\wamp64\bin\php\php7.0.12

So I changed my .bat file to:
cd C:\wamp64\bin\php\php7.0.12
php.exe -f C:\wamp64\www\SuiteCRM\cron.php

Now I get a different error when running it:
Bad data passed in; Return to Home

I think I may be close to the light at the end of this tunnel… I hope

Okay, my issue might be solved now.

I had to edit the batch file to change directory to where cron.php is stored (suitecrm root directory) rather than where php.exe is stored, and use the file location to run php.exe. Apparently this varies depending on how you installed php (bitnami, wampserver, etc.).
Batch file looks like this now:
cd C:\wamp64\www\SuiteCRM
C:\wamp64\bin\php\php7.0.12\php.exe -f cron.php

Once I ran that, I got about 25 emails about case creation at once. However, I did get a bunch of other errors - seemingly to do with other schedulers that I don’t use so I’m not concerned about that at the moment.

So now I have the task set to run at startup, then every 5 minutes after that indefinitely.
I’ll update tomorrow to confirm that my issue is solved.

Hopefully this thread will help future WAMP Server users.