Jump to content


Photo

Cron Job and Marketing Campaign - SOLVED

cron job marketing campaign

  • Please log in to reply
11 replies to this topic

#1 Gundam

Gundam

    Member

  • Members
  • PipPip
  • 25 posts

Posted 31 July 2013 - 03:16 PM

*
POPULAR

I have some problem with the Marketing Campaign regards the Scheduled Jobs.

 

I set up the cron jobs in my crontab as in the tutorial http://zurmo.org/wik...-up-job-manager

 

the user that run the cron jobs is in the same group of the apache (www-data) and the group have +w permission on all files.

 

in the attachment (error.png) you can see the error that i regain when i enter in the Campaign description, but the cron jobs is set up correctly.... so i run it manually and found that one job return an error message:

.{zurmo@crono}.[commands]$ ./zurmoc jobManager super AutoresponderMessageInQueue
    Error: The specified job type to run does not exist.

i set up correctly all the mail settings (i guess), in the job.png image you can see the scheduled jobs working.

 

Is there another check that i miss?

 

 PLEASE HELP ME !  :wacko: 

 

Attached Thumbnails

  • error.png
  • job.png


#2 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 31 July 2013 - 04:44 PM

what version of zurmo are you using?


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#3 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 31 July 2013 - 04:45 PM

also, did you watch this screencast? It helps with understanding the Job Manager: http://zurmo.org/scr...the-job-manager


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#4 Gundam

Gundam

    Member

  • Members
  • PipPip
  • 25 posts

Posted 01 August 2013 - 07:31 AM

i'm using the 2.0.15 and i watched the screencast, but i can't figure out why it does not work...

 

The error: The specified job type to run does not exist.

is telling something to you?

 

Thanks in advance!



#5 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 01 August 2013 - 04:06 PM

You can look here: http://hg.zurmo.org/...agerCommand.php. It shows where that error comes from.


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#6 Gundam

Gundam

    Member

  • Members
  • PipPip
  • 25 posts

Posted 02 August 2013 - 09:15 AM

the cron command:

./zurmoc jobManager super AutoresponderMessageInQueue

that i found in the official tutorial http://zurmo.org/wik...-up-job-manager return me the error:

The specified job type to run does not exist.

because of the lack of the file AutoresponderMessageInQueueJob.php 

i found some other file that ends with Job.php

.{zurmo@crono}.[app]$ find . | grep Job.php$
./protected/modules/campaigns/jobs/CampaignQueueMessagesInOutboxJob.php
./protected/modules/campaigns/jobs/CampaignMarkCompletedJob.php
./protected/modules/campaigns/jobs/CampaignGenerateDueCampaignItemsJob.php
./protected/modules/maps/jobs/AddressGeocodeUpdateJob.php
./protected/modules/emailMessages/jobs/EmailBounceJob.php
./protected/modules/emailMessages/jobs/ImapBaseJob.php
./protected/modules/emailMessages/jobs/ClearSentNotificationsEmailJob.php
./protected/modules/emailMessages/jobs/EmailArchivingJob.php
./protected/modules/emailMessages/jobs/TestOutboundEmailJob.php
./protected/modules/emailMessages/jobs/ProcessOutboundEmailJob.php
./protected/modules/autoresponders/jobs/AutoresponderOrCampaignBaseJob.php
./protected/modules/autoresponders/jobs/AutoresponderQueueMessagesInOutboxJob.php
./protected/modules/jobsManager/jobs/JobLogCleanupJob.php
./protected/modules/jobsManager/jobs/MonitorJob.php
./protected/modules/jobsManager/jobs/BaseJob.php
./protected/modules/jobsManager/jobs/CheckZurmoUpdatesJob.php
./protected/modules/jobsManager/tests/unit/jobs/TestJob.php
./protected/modules/jobsManager/tests/unit/jobs/TestAlwaysFailsJob.php
./protected/modules/import/jobs/ImportCleanupJob.php
./protected/modules/zurmo/jobs/CurrencyRatesUpdateJob.php
./protected/modules/export/jobs/ExportJob.php
./protected/modules/export/jobs/ExportCleanupJob.php
./protected/modules/workflows/jobs/WorkflowMessageInQueueJob.php
./protected/modules/workflows/jobs/ByTimeWorkflowInQueueJob.php
./protected/modules/workflows/jobs/WorkflowValidityCheckJob.php
.{zurmo@crono}.[app]$ 

but there is no AutoresponderMessageInQueueJob.php that is search from JobManagerCommand.php in the code below

{
     // $args[1] is AutoresponderMessageInQueue
     $jobClassName = $args[1] . 'Job';
     if (!@class_exists($jobClassName))
     {
         $this->usageError('The specified job type to run does not exist.');
     }
}

i removed the @ to see the error from class_exists() and the erroro is:

PHP Error[2]: include(AutoresponderMessageInQueueJob.php): failed to open stream: No such file or directory
in file /home/zurmo/www/yii/framework/YiiBase.php at line 421

...so, there is an error in the tutorial, this is not an critic, is abolutly a constructive post for improving this good CRM! ;)

 

The solution is in What the AutoresponderMessageInQueueJob.php have to do in the crontab and correct with the right file.

 

Thanks.



#7 Gundam

Gundam

    Member

  • Members
  • PipPip
  • 25 posts

Posted 02 August 2013 - 10:03 AM

i correct my contab, in the box below you can see the solution.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
zurmo_commands_path="/ABSOLUTE/PATH/TO/ZURMO/app/protected/commands"


* * * * * env > /tmp/env.output
#run these every minute
* * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super EmailArchiving &> /dev/null
* * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super ProcessOutboundEmail &> /dev/null

#run these every 2 minutes
*/2 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super Export &> /dev/null

# run these every 5 Minutes
*/5 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super Monitor &> /dev/null
*/5 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super EmailBounce &> /dev/null

# run these every 15 Minutes
#*/15 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager super AutoresponderMessageInQueue &> /dev/null ; ./zurmoc jobManager super ByTimeWorkflowInQueue &> /dev/null
*/15 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager super AutoresponderQueueMessagesInOutbox &> /dev/null ; ./zurmoc jobManager super ByTimeWorkflowInQueue &> /dev/null
*/15 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager super WorkflowMessageInQueue &> /dev/null

# run these every 30 minutes
*/30 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super AddressGeocodeUpdate &> /dev/null

# run these every hour
#5 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super AutoresponderMessageInQueue &> /dev/null
5 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager super AutoresponderQueueMessagesInOutbox &> /dev/null
5 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager super CampaignGenerateDueCampaignItems &> /dev/null ;
5 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager super CampaignMarkCompleted &> /dev/null ;
5 * * * * cd "$zurmo_commands_path" && ./zurmoc jobManager super CampaignQueueMessagesInOutbox &> /dev/null ;

#run these once a day, early in the morning
30 3 * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super TestOutboundEmail &> /dev/null
30 4 * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super CurrencyRatesUpdate &> /dev/null
30 5 * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super ClearSentNotificationsEmail &> /dev/null
30 6 * * * cd "$zurmo_commands_path" && ./zurmoc jobManager  super WorkflowValidityCheck &> /dev/null

# run these on saturday morning
35 2 * * 6 cd "$zurmo_commands_path" && ./zurmoc jobManager  super ImportCleanup &> /dev/null
35 3 * * 6 cd "$zurmo_commands_path" && ./zurmoc jobManager  super ExportCleanup &> /dev/null
35 4 * * 6 cd "$zurmo_commands_path" && ./zurmoc jobManager  super CheckZurmoUpdates &> /dev/null
35 5 * * 6 cd "$zurmo_commands_path" && ./zurmoc jobManager  super JobLogCleanup &> /dev/null

i hope that the tutorial where changed whith the right commands.

 

The variable $zurmo_install_path does not work for me, so i changed the line:

zurmo_commands_path="$zurmo_install_path/app/protected/commands"

in:

zurmo_commands_path="/ABSOLUTE/PATH/TO/ZURMO/app/protected/commands"

 

Best Regards, this topic is SOLVED! ;)



#8 Gundam

Gundam

    Member

  • Members
  • PipPip
  • 25 posts

Posted 02 August 2013 - 10:06 AM

how can i mark this as SOLVED?



#9 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 02 August 2013 - 04:08 PM

OK, great! you were able to resolve the issue. I have marked "SOLVED" in the title of this post.


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#10 Gundam

Gundam

    Member

  • Members
  • PipPip
  • 25 posts

Posted 07 August 2013 - 07:27 AM

The tutorial must be changed.... 

http://zurmo.org/wik...-up-job-manager



#11 Stafford

Stafford

    Zurmo Member

  • Moderators
  • 212 posts

Posted 07 August 2013 - 01:03 PM

The tutorial must be changed.... 

http://zurmo.org/wik...-up-job-manager

Thanks. We will update it. 



#12 Gundam

Gundam

    Member

  • Members
  • PipPip
  • 25 posts

Posted 07 August 2013 - 03:23 PM

Thanks. We will update it. 

;)







Also tagged with one or more of these keywords: cron job, marketing, campaign

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users