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

More
3 years 5 months ago - 2 years 10 months ago #135575 by DenisChenu
This plugin allow you to send email by a script in crontab or scheduled event.



Usage
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 .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 2 years 10 months ago by DenisChenu.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
2 years 10 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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago - 2 years 10 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
 php application/commands/console.php plugin cron --interval=1

If you receive :
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 .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 2 years 10 months ago by DenisChenu.

Please Log in or Create an account to join the conversation.

More
2 years 4 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.

Please Log in or Create an account to join the conversation.

More
2 years 4 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
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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
2 months 18 hours ago #187793 by rouuuge
hi,

I got following error if i try to execute the script:
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?

Please Log in or Create an account to join the conversation.

More
1 month 4 weeks 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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!