Report Scheduling Issue

Hello All,
I am trying to get the report scheduler working. I’m not sure where to start (for you to offer assistance). I’ve got the report(s) built, and scheduled. I’ve got the line provided in the documentation added to CRON, and CRON is running. However the report is never listed as run.

CRON is listing an ā€œInfoā€ in syslog that says MTA Not Found, but my googling leads me to believe that it’s not relevant to this issue. But I could be wrong there. Do I need Postfix on my server?

Please let me know what you need and I’ll provide anything I can to help you help me.

Server: Ubuntu 22.04
SuiteCRM: 8.5.0

Thank you all!

Hello Peter,

you’ll need the cronjob to be working. Your tasks inside the scheduler / cronjobs show as being executed?

And then, you’ll need to have a system outbound email setup and working.
Do the assignment / forgot password emails work?
Do emails from a workflow work?

What you can do to test both components: Build a workflow, that is triggered only by the scheduler and sends an email.

Does the report itself work? Do you see data there?

And eventually: There have been quite some bug fixes since 8.5.
If all the above is working, you could go through the release notes and check all the bug fixes and see whether there has been sth. along the lines of your described issue.

Hi Bastian,
As far as I can tell, CRON is running and the tasks are being executed. I believe based on the fact that CRON is asking for an MTA, that there’s data present (aka, running). Does Suite need an MTA in order to send emails? See the below screenshot:

Are you referring to an MTA like Postfix? Or are you referring to an external email server? We have an email server setup with pair mail currently.

I’ve never tried the forgot password functionality, but the send test email function works correctly and sends the test email without issue.

Not sure, will have to try one. I have no experience with workflows, I’ll have to do some research into these.

The report itself works. It’s on my dashboard, and works correctly. The data also shows up correctly in the report screen

I’ll look into a workflow and update the post. Do I need an MTA like postfix installed?

Thank you for all your help!

Additionally, after creating a workflow, and then looking through the scheduler, it appears nothing in the scheduler has ever run. Every record in the scheduler has ā€œneverā€ listed in the ā€œlast successful runā€ field.

Thank you in advance!

The cron jobs produce some output and the system wants to send it to you.

Could you execute the cron job manually from the CLI to see what the output is?
If none of them ever ran, there is an issue around the cron / scheduler system.

I don’t have the CLI installed. Is there a way to trigger it via command line on the server?

Google provided this option, but I do not have the cron.php in that folder when I list the items contained within it.

Yes, via the command line is correct (sorry for the abbreviation. CLI = Command Line Interface - so exactly like you suggested).

If you do:

cd /SuiteCRM Install Path/public/legacy
sudo -u www-data php -f cron.php

Your cron job should be executed as the www-data user (you’d need to change it to your webserver user, if its different).
It should execute without any print outs.

Afterwards, in your scheduler, you should see in the task: Process Workflow Tasks
the execution in the ā€˜Job Log’ subpanel.

Hi Bastian,
There’s light at the end of the tunnel! Running it manually via the CLI, as you described, worked. I received about 140 emails based off of my workflow and email template (which I obviously need to refine). But it worked.

The question now is, why didn’t it work automatically. Any idea where to start looking there?

In this case, your cronjob isn’t setup.

If you’re on the server and execute:

sudo -u www-data crontab -l

you what’s currently setup.

With
sudo -u www-data crontab -e
you can edit it.

Mine looks like this eg.:

* * * * * cd /var/www/url.com/crm.url.com/public/legacy; php -f cron.php > /dev/null 2>&1

If you’re executing the cron as a user without write permissions to the CRM cache folder, it’ll fail and never show as executed.
So www-data is a safe bet on most servers. You’d have to adjust it according to your server setup to match the webserver user.

Bastian,
I’m not quite sure how to say thank you, but Thank You! I’m not sure what’s different between your cron job and mine, but when I took yours, adjusted the file path, and then cut and pasted into my cron, it worked and has been working since.

Thank you, thank you, thank you!

1 Like

New doc on it. I think for v8.9 & onwards: