Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Sending automatic reminders and invitations

  • oledole
  • oledole's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 4 months 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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
5 years 4 months ago #186926 by DenisChenu
Replied by DenisChenu on topic Sending automatic reminders and invitations
Why use sudo !!

Did you try with
Code:
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 support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: oledole
The topic has been locked.
  • oledole
  • oledole's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 4 months ago #186944 by oledole
Replied by oledole on topic Sending automatic reminders and invitations
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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
5 years 4 months ago #186948 by DenisChenu
Replied by DenisChenu on topic Sending automatic reminders and invitations

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 support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: oledole
The topic has been locked.
More
4 years 10 months 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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
4 years 10 months ago #193024 by DenisChenu
Replied by DenisChenu on topic Sending automatic reminders and invitations
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 support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: ch123
The topic has been locked.
More
4 years 10 months 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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
4 years 10 months ago #193063 by DenisChenu
Replied by DenisChenu on topic Sending automatic reminders and invitations
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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 2 months ago #250603 by Mazi

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?
You can use this script for automatically sending email reminders:  survey-consulting.com/product/automatica...end-email-reminders/

It comes with many settings so you can e.g. set a reminder sending start date or define the interval between the different reminders.

Best regards/Beste Grüße,
Dr. Marcel Minke
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
1 year 2 months ago #250604 by DenisChenu
Replied by DenisChenu on topic Sending automatic reminders and invitations
Please Marcel don't answer to a locked topic … 3 years after …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose