[Vtigercrm-developers] Workflow for sending mail in the future

Sutharsan Jeganathan ajstharsan at gmail.com
Fri Apr 8 11:46:53 GMT 2016


Hi

It could be the bug in scheduled workflow with conditions

Did you check
https://discussions.vtiger.com/index.php?p=/discussion/174826/on-schedule-workflow-does-not-work-/p1

Thanks
Sutharsan jeganathan
On 8 Apr 2016 12:34 pm, "Estefan Civera" <estefan.civera at gmail.com> wrote:

> Hi All,
>
> I need to develop a system that allows me to send programmatly email after
> planning them.
>
> Here's an example
> today I create an event in which I plan to send an email from 5 days at
> 18:30
> I would that automatically 5 days at 18:30 through a workflow seemed this
> email.
>
> So I created a workflow that runs hourly and that checks if the start
> datetime of event is between (NOW()-$value HOURS and NOW())
>
> To do this  I've used "less than hours before" function that runs like this
> code below
>
> $rawFieldValue = date time of events....
> $value = 1 // hours to go in the past
>
> case 'less than hours before':
> if(empty($rawFieldValue) || empty($value)) {
>         return false;
> }
> $currentTime = date('Y-m-d H:i:s');
> $olderDateTime = date('Y-m-d H:i:s', strtotime('-'.$value.' hours'));
> if($olderDateTime <= $rawFieldValue && $rawFieldValue <= $currentTime) {
>         return true;
> }
> return false;
>
> I don't know this workflow never fires and the other works correctly.
>
> Thank EC
>
>
>
> -----
> Ing. Estefan Civera
> Vtiger developer and consultant
> http://www.estefancivera.net
> Italy
> --
> View this message in context:
> http://vtiger-crm.2324883.n4.nabble.com/Workflow-for-sending-mail-in-the-future-tp18763.html
> Sent from the vtigercrm-developers mailing list archive at Nabble.com.
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20160408/e7442185/attachment.html>


More information about the vtigercrm-developers mailing list