Welcome to the LimeSurvey Community Forum

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

Automate smtp send using cron

  • priza
  • priza's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #145203 by priza
Automate smtp send using cron was created by priza
as stated here: manual.limesurvey.org/Global_settings#Email_settings
smtp email send method is manual.
can i automate it using cron?
found this: manual.limesurvey.org/Cron
but i;m not sure how to use it for smtp
in a workcase of 6000 participants in a 300email per hour batch send, can be a problem
thanx
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #145205 by holch
Replied by holch on topic Automate smtp send using cron
Maybe this script here can help you: www.limesurvey-templates.com/limesurvey-...vv9lasvbhir2lfuekd27

(I am in no way affiliated with the shop and I have not tested it, I just know that it exists)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • priza
  • priza's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #145210 by priza
Replied by priza on topic Automate smtp send using cron
i'd prefer a hint to write my own crontab entries, but that can also do the trick. thanx!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #145222 by holch
Replied by holch on topic Automate smtp send using cron
sorry, can't help there.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #145241 by DenisChenu
Replied by DenisChenu on topic Automate smtp send using cron

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.
  • priza
  • priza's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #145246 by priza
Replied by priza on topic Automate smtp send using cron
your script can work with smtp?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #145251 by DenisChenu
Replied by DenisChenu on topic Automate smtp send using cron
Work in any mail system configurated in LimeSurvey, try it.

And it's GPL : then can be fixed/updated/ etc ....

For example : have an option to send X email each time (and not more) can be a good isea.

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.
  • priza
  • priza's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #145732 by priza
Replied by priza on topic Automate smtp send using cron
tried sendMailCron plugin. i set it up amd tries to run the cron command but failed. my output:
php /home/prorataonlinesurveys/public_html/application/commands/console.php plugin cron --interval=20
PHP Notice: Undefined index: SERVER_PORT in /home/prorataonlinesurveys/public_html/application/config/internal.php on line 122
PHP Notice: Undefined index: SERVER_PORT in /home/prorataonlinesurveys/public_html/application/config/internal.php on line 152
exception 'CException' with message 'Application runtime path "/home/prorataonlinesurveys/public_html/application/runtime" is not valid. Please make sure it is a directory writable by the Web server process.' in /home/prorataonlinesurveys/public_html/framework/base/CApplication.php:294
Stack trace:
#0 /home/prorataonlinesurveys/public_html/framework/base/CApplication.php(281): CApplication->setRuntimePath('/home/prorataon...')
#1 /home/prorataonlinesurveys/public_html/framework/caching/CFileCache.php(79): CApplication->getRuntimePath()
#2 /home/prorataonlinesurveys/public_html/framework/base/CModule.php(394): CFileCache->init()
#3 /home/prorataonlinesurveys/public_html/framework/db/schema/CDbSchema.php(90): CModule->getComponent('cache')
#4 /home/prorataonlinesurveys/public_html/framework/db/ar/CActiveRecord.php(2386): CDbSchema->getTable('{{settings_glob...')
#5 /home/prorataonlinesurveys/public_html/framework/db/ar/CActiveRecord.php(411): CActiveRecordMetaData->__construct(Object(SettingGlobal))
#6 /home/prorataonlinesurveys/public_html/framework/db/ar/CActiveRecord.php(680): CActiveRecord->getMetaData()
#7 /home/prorataonlinesurveys/public_html/application/models/LSActiveRecord.php(29): CActiveRecord->hasAttribute('created')
#8 /home/prorataonlinesurveys/public_html/framework/db/ar/CActiveRecord.php(396): LSActiveRecord->behaviors()
#9 /home/prorataonlinesurveys/public_html/application/models/SettingGlobal.php(28): CActiveRecord::model('SettingGlobal')
#10 /home/prorataonlinesurveys/public_html/application/libraries/PluginManager/PluginManager.php(321): SettingGlobal::model()
#11 /home/prorataonlinesurveys/public_html/application/libraries/PluginManager/PluginManager.php(43): ls\pluginmanager\PluginManager->loadPlugins()
#12 /home/prorataonlinesurveys/public_html/framework/base/CModule.php(394): ls\pluginmanager\PluginManager->init()
#13 /home/prorataonlinesurveys/public_html/framework/base/CModule.php(103): CModule->getComponent('pluginManager')
#14 /home/prorataonlinesurveys/public_html/application/commands/PluginCommand.php(21): CModule->__get('pluginManager')
#15 [internal function]: PluginCommand->actionCron('20')
#16 /home/prorataonlinesurveys/public_html/framework/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs(Object(PluginCommand), Array)
#17 /home/prorataonlinesurveys/public_html/framework/console/CConsoleCommandRunner.php(71): CConsoleCommand->run(Array)
#18 /home/prorataonlinesurveys/public_html/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run(Array)
#19 /home/prorataonlinesurveys/public_html/framework/base/CApplication.php(185): CConsoleApplication->processRequest()
#20 /home/prorataonlinesurveys/public_html/application/commands/console.php(55): CApplication->run()

also tried with different syntax
php /home/prorataonlinesurveys/public_html/application/commands/console.php sendMailCron cron --interval=2
PHP Notice: Undefined index: SERVER_PORT in /home/prorataonlinesurveys/public_html/application/config/internal.php on line 122
PHP Notice: Undefined index: SERVER_PORT in /home/prorataonlinesurveys/public_html/application/config/internal.php on line 152
Yii command runner (based on Yii v1.1.17)
Usage: /home/prorataonlinesurveys/public_html/application/commands/console.php <command-name> [parameters...]

The following commands are available:
- install
- message
- migrate
- plugin
- resetpassword
- shell
- webapp
- wipe

To see individual command help, use the following:
/home/prorataonlinesurveys/public_html/application/commands/console.php help <command-name>
i'm using version 2.56.1+161118. also, do i put the command in crontab?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #145734 by DenisChenu
Replied by DenisChenu on topic Automate smtp send using cron
It's not the good place for report this bugh.

But here : seems not related with plugin, more with console.php plugin cron
github.com/LimeSurvey/LimeSurvey/commit/...14f77e1c02e054eb6cb9

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