[Vtigercrm-developers] Email list of tasks?
Sukhdev Mohan
s.mohan at myti.it
Mon Aug 9 16:33:30 GMT 2021
I’ve done this.
My solution was to Cron job a php script that creates tasks. This is an extract from my script & configuration:
Cron: 0 2 * * 1 (Every Monday at 2 am) PHPBIN /path/to/vtiger/script.php
The script could look like:
global $current_user, $adb;
$user = new Users();
$current_user = $user->getActiveAdminUser();
$data = [
'subject' => sprintf('Subject'),
'assigned_user_id'=> "19x".$user,
'date_start' => date('Y-m-01'),
'time_start' => '09:00:00',
'time_end' => '18:00:00',
'due_date' => date('Y-m-t'),
'parent_id'=> '11x'.$parentModule['id'],
'taskstatus'=> 'Planned',
'taskpriority' => 'High',
'sendnotification' => 1,
'activitytype' => 'Task',
'reminder' => 1 // this will send email
];
try {
vtws_create('Calendar', $data, $current_user);
} catch (WebServiceException $exception) {
file_put_contents("logs/Tasks", $exception->getMessage().PHP_EOL, 8);
}
Sukhdev Mohan
Developer
On 9 Aug 2021, 10:49 +0200, socialboostdk <socialboostdk at gmail.com>, wrote:
> Hi there,
>
> I'm supposed to make a workflow that will send an email each monday, with a list of assigned tasks to each Vtiger user.
>
> Any ideas on how to achieve that?
>
> :-) Thanks!
>
> //Chris
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20210809/b73fc87f/attachment.html>
More information about the vtigercrm-developers
mailing list