Page 1 of 1
Cron Job to Find Today's Press 1's
Posted:
Thu Jul 26, 2018 5:10 am
by thephaseusa
Almost there.
30 * * * * /usr/bin/mysql -u root -pmypass asterisk <<<'select * from vicidial_list where security_phrase like "\%INTEREST\%" and last_local_call_time like "\%`date +\%Y-\%m-\%d`\%"' > /usr/share/astguiclient/LEADS_IN/newleads.txt
this works if i put in an actual date like 2018-07-26 but not when i ask it to pull todays (date)
Re: Cron Job to Find Today's Press 1's
Posted:
Thu Jul 26, 2018 7:44 am
by mflorell
For MySQL I usually use something like this:
CONCAT(DATE_ADD(CURDATE(), INTERVAL -0 DAY),' ',CURTIME()) ) )
Re: Cron Job to Find Today's Press 1's
Posted:
Thu Jul 26, 2018 7:57 am
by blackbird2306
Change SELECT part this way:
30 * * * * /usr/bin/mysql -u root -pmypass asterisk <<< 'select * from vicidial_list WHERE `security_phrase` LIKE "\%INTEREST\%" and DATE(`last_local_call_time`) = CURDATE()' > /usr/share/astguiclient/LEADS_IN/newleads.txt
Re: Cron Job to Find Today's Press 1's
Posted:
Thu Jul 26, 2018 7:59 am
by blackbird2306
Sorry Matt I didn't update, so I didn't read your post
Re: Cron Job to Find Today's Pre/usr/share/astguiclient/VIss
Posted:
Thu Jul 26, 2018 8:55 am
by thephaseusa
Hi Guys and thank you!I
When i get it into a file how do i pull the leads in the file and move these new leads into list id 607, like this?
/usr/share/astguiclient/VICIDIAL_IN_new* --forcelistid=607
Re: Cron Job to Find Today's Press 1's
Posted:
Thu Jul 26, 2018 11:50 am
by blackbird2306
Do you need the leads to be copied as new leads or is it OK to "move" them from list A to B ? But this means they are not present in list A anymore. Reimporting is much more complicated than changing their original list_id.