AnsweredAssumed Answered

Scheduler : How to call a custom module function ?

Question asked by AntoineB AntoineB on Aug 24, 2015
Latest reply on Aug 26, 2015 by AntoineB AntoineB
Hello,

I've created a custom module (on SugarCRM 7.5.2.3) that has a function that is sending emails to my customers, and I'm trying to call this function in a cron job using the scheduler.

My function is working properly when I'm calling the corresponding view, but not when called using the scheduler. I'm getting the following error in the logs :
Mon Aug 24 12:44:56 2015 [3521][1][FATAL] Job f3a599ef-2e3e-af01-a16b-55db0296e410 (Relance client mail) failed in CRON run
And no mails are sent nor actions performed on the DB.

Here's my job configuration.



Note that when I edit the job, the type is set as "URL" and "Job's URL" is empty, I don't know if that's related to the problem.

In my module, the function that I want to call is "action_sendmails()", which is both managing the corresponding view and sending the emails.

Do you have any idea on what I should do in order to make it run properly ?

Thanks :)

Outcomes