[Vtigercrm-developers] Vtiger Workflow Running In The Background

Adam Heinz amh at metricwise.net
Tue Dec 18 07:00:45 PST 2012


We have a workflow that emails customers the day before their appointment
that has

$wm = new VTWorkflowManager($adb);
$wf = $wm->newWorkflow('Events');
$wf->executionCondition = VTWorkflowManager::$ONCE;
...
$wm->save($wf);

$tm = new VTTaskManager($adb);
$task = $tm->createTask('VTEmailTask', $wf->id);
$task->trigger = array(
'days' => -1,
'field' => 'date_start',
);
...
$tm->saveTask($task);

Based on this, it seems to me like it would be easy enough to email them
once... so write a yearly cron job to reset the sent flag for
all VTEmailTasks of that workflow?



On Mon, Dec 17, 2012 at 10:52 PM, Petar Dimov <phdimov at gmail.com> wrote:

> Hi,
>
> I have been tasked to make happen a simple feature with Vtiger.
>
> Send an email on our customer's birthdays.
>
> Just realized I can't really accomplish that with workflows. ( Set a
> condition if customer birthdate is today) to email them.
>
> Is there any non coding way to do this or I have to write a separate cron
> job for that?
>
> --
> Best Regards,
>
> Petar Dimov
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20121218/874a6dad/attachment.html 


More information about the vtigercrm-developers mailing list