Sending automatic reminders and invitations

More
6 months 4 weeks ago #186920 by oledole
Hi and good day to all. I have an issue I would like to know if there is anyway to solve.

The situation: I want invitations and reminders on active surveys to be sent out automatically. I've done this before with the great sendMailCron Plugin .

However I've had some issues with certificates on the server which ended up making it so I couldn't send mail at all. I've later resolved the issue and I'm able to send mail through the GUI and similar again.

It also works using the "php yourlimesurveydir/application/commands/console.php plugin cron --interval=1 sendMailCronSimulate=1" as mentioned on sendMailCron plugin documentation.

However my crontask is not able to run this automatically every hour.

My script that cron tries to run every hour:

#!/bin/sh
sudo php /var/www/limesurvey/application/commands/console.php plugin cron --interval=1 sendMailCronDebug=3

When I test this manually by running "cd / && run-parts --report /etc/cron.hourly" I get this error:
CException: Application runtime path "/var/www/limesurvey/var/www/limesurveytmp/var/www/limesurveyruntime" is not valid. Please make sure it is a directory writable by the Web server process. in /var/www/limesurvey/framework/base/CApplication.php:294
Stack trace:
#0 /var/www/limesurvey/framework/base/CComponent.php(152): CApplication->setRuntimePath('/var/www/limesu...')
#1 /var/www/limesurvey/framework/base/CModule.php(520): CComponent->__set('runtimePath', '/var/www/limesu...')
#2 /var/www/limesurvey/framework/base/CApplication.php(166): CModule->configure(Array)
#3 /var/www/limesurvey/application/core/ConsoleApplication.php(41): CApplication->__construct(Array)
#4 /var/www/limesurvey/framework/YiiBase.php(132): ConsoleApplication->__construct(Array)
#5 /var/www/limesurvey/application/commands/console.php(56): YiiBase::createApplication('ConsoleApplicat...', Array)
#6 {main}run-parts: /etc/cron.hourly/surveyReminder exited with return code 1

So now I'm not sure how to solve this.

Is there any way to send mail automatically with Limesurvey? I'm trying to use this plugin but have the problem above. Is there a solution to this problem, or is there an alternative method to do it?

Thank you for the help.

Please Iniciar sessão or Create an account to join the conversation.

LimeSurvey Partners
More
6 months 4 weeks ago #186926 by DenisChenu
Why use sudo !!

Did you try with
cd  /var/www/limesurvey/application/
php application/commands/console.php plugin cron --interval=1 sendMailCronDebug=3

What is your LimeSurvey build and version number ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: oledole

Please Iniciar sessão or Create an account to join the conversation.

More
6 months 3 weeks ago #186944 by oledole
Thank you, this seems to have worked. Running the cronjob manually atleast worked fine, so it should run by itself later. Weird that the previous command seemed to work for me before...

Regarding sudo, I added it to check if it was part of the problem. I'll remove it now, thanks for the heads up.

I'll check if everything keeps working. Thank you for now.

-Limesurvey Version 3.17.3+190429.

Please Iniciar sessão or Create an account to join the conversation.

More
6 months 3 weeks ago #186948 by DenisChenu

oledole wrote: Limesurvey Version 3.17.3+190429.

Please, can you report the issue with the original link at gitlab.com/SondagesPro/mailing/sendMailCron/issues

Maybe there are an issue in this version of LimeSurvey (and must be fixed). But sendMailCron must work with any configuration and version …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: oledole

Please Iniciar sessão or Create an account to join the conversation.

More
4 weeks 7 hours ago #193023 by ch123
Hey DenisChenu,

maybe you could help me with the plugin.
I installed it on my server and typed in "php yourlimesurveydir/application/commands/console.php plugin cron --interval=1". Everything worked fine, there was no error and all mails of all surveys were sent after this. But now there aren't any automatic reminders...
What am I doing wrong? I thought the command would activate the plugin and the mails are sent automatically after that.
Do I have to change other settings (like the "host info for url" in the general settings for the plugin)?
Or is it due to my limesurvey version (Version 3.19.2)?

Any help would be awesome :D

Please Iniciar sessão or Create an account to join the conversation.

More
4 weeks 7 hours ago #193024 by DenisChenu
You need to setup a cron task

To use this plugin you need to have access to php cli on server, and to be allowed to create cron or scheduled task.

No PHP plugin can setup a cron task (else it's a MAJOR security issue).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: ch123

Please Iniciar sessão or Create an account to join the conversation.

More
4 weeks 7 hours ago #193026 by ch123
Ah, I see. Sorry, didn't get that - thanks for the answer!
As I don't have any experience with doing such a cron task, it's probably not the right plugin for me then. But still thank you for the nice plugin.

Please Iniciar sessão or Create an account to join the conversation.

More
3 weeks 6 days ago #193063 by DenisChenu
You never found a system to send automatically without putting a system on the server , or a cron task on an external server on a PHP file only …

Automatically didn't mean something : someone have to put an 'event' somewhere. Cron or Sheduled task is this event.

If you are on a linux with a CLI access : see en.wikipedia.org/wiki/Cron and help.ubuntu.com/community/CronHowto

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Please Iniciar sessão or Create an account to join the conversation.

Começar agora!

Basta criar a sua conta e comece a usar o LimeSurvey hoje mesmo.

Registar agora
Subscreva o nosso boletim informativo!

Iniciar sessão