Autoresponder cron job not working

Hi again people! Happy Thanksgiving, if that’s something you celebrate!

So - I’ve got the autoresponder plugin:

I THINK it works if I manually process autoresponders in the interface (although I can’t completely confirm that)…

But I’m trying to get it to go as a cron job… and that’s giving me something I don’t quite get - a date warning with a list of other stuff that I’m not entirely sure is even due to the date warning - I’ll show you:

date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead

#0 [internal function]: CommonPlugin_Exception::errorHandler(2, 'date(): It is n...', '/home/thirdopti...', 373, Array)
#1 /home/thirdoption/www/www/lists/admin/connect.php(373): date('Y')
#2 /home/thirdoption/www/www/lists/admin/plugins/Autoresponder/Controller/Process.php(36): ClineSignature()
#3 /home/thirdoption/www/www/lists/admin/plugins/CommonPlugin/Controller.php(88): Autoresponder_Controller_Process->actionDefault()
#4 /home/thirdoption/www/www/lists/admin/plugins/CommonPlugin/Main.php(41): CommonPlugin_Controller->run(NULL)
#5 /home/thirdoption/www/www/lists/admin/plugins/Autoresponder/process.php(26): CommonPlugin_Main::run(Object(Autoresponder_ControllerFactory))
#6 /home/thirdoption/www/www/lists/admin/index.php(643): include('/home/thirdopti...')
#7 {main}

Does anybody recognize this? here’s the command that’s getting sent in the cron job:

/usr/local/bin/php.cli /home/thirdoption/www/www/lists/admin/index.php -m Autoresponder -p process -c /home/thirdoption/www/www/lists/config/config.php

and then of course there’s a process queue command:

/usr/local/bin/php.cli /home/thirdoption/www/www/lists/admin/index.php -p processqueue -c /home/thirdoption/www/www/lists/config/config.php

that part is confirmed working. it’s that first command that gives me the whole bunch of date related feedback. I did find this:

and so I put a timezone command in my local php.ini as suggested (I don’t have access to the global one - it’s a shared server situation)… but that doesn’t seem to have done anything…

so…anybody recognize this? :slight_smile: :smile:

The simplest way to set the timezone is using the Timezone plugin

very interesting and cool thanks! I installed it and I’m not getting that error series now… still not entirely sure if the autoresponders are actually WORKING…I kind of expected them to send just now because I thought the first one was overdue for my test emails but…actually have reason to believe that’s not the case (I changed the first one today - after doing my test signups but before it should have fired off)…

so…I suppose I will have to see tomorrow - and I’ll update this thread :smile:

thanks for the reply!

The “process autoresponders” page doesn’t do the sending. it only sets the campaign to “submitted” when there are one or more subscribers to send to. You still need to run process queue in order to send the campaign.

This is explained in the documentation

Oh I know. There’s a process queue command in my script… I’m not entirely sure the messages are getting submitted right… But I’ll have to get back to ya to confirm that :smile:

Thanks again!

Hi again! :slight_smile: Well the news is this: Something’s not right but I’m not sure what LOL. ONE of my test emails got the first message…the others didn’t. The first autoresponder attribute gets populated with the date/time when “process autoresponders” runs. the queue sees that there’s a message to be sent, but says there’s nobody to send it to.

…so none of the user addresses are getting emails. odd. Very odd. I don’t know in detail how this works - let me see if I can guess:

1 - campaign is created, assigned to a list, and saved as draft
2 - autoresponder is created, assigned a time delay, and connected to campaign
3 - user signs up, date of sign up is stored in phplist db
4 - attribute called autoresponder_ID is created for user that contains either nothing or a date, which is the date that message was sent to that user
5 - every time “process autoresponders” is run, it checks each autoresponder, finds the campaign associated, finds the list associated with that campaign, then checks every user on that list to see if any have a null or blank in autoresponder_ID attribute.
6 - if a user has blank autoresponder_ID attribute, “process autoresponders” checks the date of signup against the delay. if the current date is past the date the delay indicates, it submits the message to the queue and marks the autoresponder_ID attribute with the current date.

— this is where I’m hazy - how does the queue understand to only send to that user?

  1. Queue is processed, and message is sent to users who are marked for sending.

In this scenario, if, say, you forget to “process autoresponders” for 2 weeks, then a whole bunch of people might get messages all at once. like User 1 gets his 1st day message 1 week late and his 1 week message right after that.

Do I understand this right?

Thanks again for engaging! I’ll paste the output I’m getting right now when I run the ‘process autoresponders + process queue’ script :smile:

phpList version 3.2.3 © 2000-2015 phpList Ltd,
1 messages processedphpList version 3.2.3 © 2000-2015 phpList Ltd,
phpList - Recently sent : 0
phpList - Started [0.0031180000] (111)
phpList - Sending in batches of 200 emails [0.0001490000] (112)
phpList - Processing has started, [0.0005250000] (115)
phpList - One campaign to process. [0.0004690000] (117)
phpList - Processing message 3 [0.0032820000] (130)
phpList - Looking for subscribers [0.0009240000] (135)
phpList - 14 subscribers apply for attributes, now checking lists [0.0016610000] (139)
phpList - Found them: 14 to process [0.0004680000] (143)
phpList - Processing batch of: 14 [0.0006340000] (147)
phpList - Campaign sending timed out, is past date to process until [0.0003130000] (149)
phpList - Processed 1 out of 14 subscribers [0.0004190000] (151)
phpList - Hmmm, No subscribers found to send to [0.0004040000] (153)
phpList - It took 3 days 16 hours 31 minutes 47 seconds to send this message [0.0011450000] (162)
phpList - Script stage: 3 [0.0008570000] (165)
phpList - Finished, Nothing to do [0.0001270000] (166)
phpList - Finished, All done [0.0003740000] (169)

Just about. When there are subscribers ready to receive a campaign the “process autoresponders” page creates a list of those, which is used when phplist does the actual sending.

This line is significant. You need to set the “stop sending after” date on the Scheduling tab far enough in the future, I think that the default is 6 months.

I just discovered that about 10 seconds before I got this email lol… on my phplist, the default is actually that day…

so I changed that and ran the script and immedietely got the next email in all my test boxes! woo!

so - I THINK it’s running - I’ve got it live now, in a beta test kind of mode, and we’ll see what happens.

I think I’ll write a blog post with more detail about how to get autoresponder running - do you think that would help people? I have to put out content to help drive traffic anyway - might as well be useful stuff.

– A

Ok - I’ve put a tutorial up - let me know what you think or if it needs anything! :smile:

1 Like

I was going to give up but your tutorial saved me, thank you very much.

Awesome! That makes my day!

  • A

@nquit page not found

Weird. I found it again:

Maybe I moved it - sorry!

The thing moved…

1 Like