Welcome to the LimeSurvey Community Forum

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

sendMailCron : Allow to send token email (invite or reminder) via PHP cli .

  • DenisChenu
  • DenisChenu's Avatar Topic Author
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago - 7 years 3 months ago #135575 by DenisChenu
This plugin allow you to send email by a script in crontab or scheduled event.



Usage
Code:
php yourlimesurveydir/application/commands/console.php plugin cron --interval=1400
Plugin don't use interval : try to send email according to settings each time.

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 .
I don't answer to private message.
Last edit: 7 years 3 months ago by DenisChenu.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar Topic Author
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #145243 by DenisChenu

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 .
I don't answer to private message.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar Topic Author
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago - 7 years 3 months ago #145924 by DenisChenu
Before activating the plugin

LimeSurvey plugin cron system before this fix was broken.

Then before activating the plugin, test the LimeSurvey system with
Code:
 php application/commands/console.php plugin cron --interval=1

If you receive :
Code:
exception 'CException' with message 'Application runtime path "/home/web/htdocs/limesurvey/application/runtime" is not valid. Please make sure it is a directory writable by the Web server process.' in /home/web/htdocs/limesurvey/framework/base/CApplication.php:294
or something similar : create manually the application/runtime directory.

source

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 .
I don't answer to private message.
Last edit: 7 years 3 months ago by DenisChenu.
The topic has been locked.
More
6 years 9 months ago #155601 by madscience
Hi Denis,

Im am currently trying to set up the sendmailcron pluging in my limesurvey 2.65.2+170606 release. I already moved the pluginin the plugins directory and activated it.

What I can not figure out is, what is ment with:

Then before activating the plugin, test the LimeSurvey system with
php application/commands/console.php plugin cron --interval=1


Can you give me a hint how to do this?

Should I add the line plugin cron --interval=1 in the config.php?

Thanks and Regards madscience.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar Topic Author
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago #155659 by DenisChenu
You need a command/shell access at the server. If you don't have one : you can not tes the plugin. But if you have a cron access : you must have a shell access on the server. Then you can launch
Code:
php application/commands/console.php plugin cron --interval=1
In a console , a shell. SSH access with a linux server for example.

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 .
I don't answer to private message.
The topic has been locked.
More
4 years 6 months ago #187793 by rouuuge
hi,

I got following error if i try to execute the script:
Code:
exception 'CDbException' with message 'CDbConnection failed to open the DB connection.' in /httpdocs/framework/db/CDbConnection.php:388
Stack trace:
#0 /httpdocs/framework/db/CDbConnection.php(330): CDbConnection->open()
#1 /httpdocs/framework/db/CDbConnection.php(308): CDbConnection->setActive(true)
#2 /httpdocs/framework/base/CModule.php(387): CDbConnection->init()
#3 /httpdocs/framework/base/CApplication.php(457): CModule->getComponent('db')
#4 /httpdocs/framework/db/ar/CActiveRecord.php(634): CApplication->getDb()
#5 /httpdocs/framework/db/ar/CActiveRecord.php(1428): CActiveRecord->getDbConnection()
#6 /httpdocs/framework/db/ar/CActiveRecord.php(1534): CActiveRecord->getTableAlias(true)
#7 /httpdocs/application/libraries/PluginManager/PluginManager.php(323): CActiveRecord->findAllByAttributes(Array)
#8 /httpdocs/application/libraries/PluginManager/PluginManager.php(43): ls\pluginmanager\PluginManager->loadPlugins()
#9 /httpdocs/framework/base/CModule.php(387): ls\pluginmanager\PluginManager->init()
#10 /httpdocs/framework/base/CModule.php(103): CModule->getComponent('pluginManager')
#11 /httpdocs/application/commands/PluginCommand.php(21): CModule->__get('pluginManager')
#12 [internal function]: PluginCommand->actionCron('1')
#13 /httpdocs/framework/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs(Object(PluginCommand), Array)
#14 /httpdocs/framework/console/CConsoleCommandRunner.php(71): CConsoleCommand->run(Array)
#15 /httpdocs/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run(Array)
#16 /httpdocs/framework/base/CApplication.php(184): CConsoleApplication->processRequest()
#17 /httpdocs/application/commands/console.php(55): CApplication->run()
 

can you tell me what's wrong?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar Topic Author
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #187829 by DenisChenu
Didn't know, and don't seem to be related to SendMailCron because it's not called here.

Then : you must fix your LimeSurvey issue before.

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 .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose