galliMassmail plugin cron job help

If you have experience with the galliMassmail plugin I'd appreciate some help.

To create the 5 minute cron job, in my Direct Admin control panel I set the frequency to

5****

and the command to

home/myaccount/domains/mydomain/public_html/elgg/mod/galliMassmail/

I also tried it without the trailing slash. I asked for help from the plugin author re path to plugin, but get the impression they only occasionally reply in the case of their free plugins. Would appreciate hearing from anyone with experience of this plugin or otherwise as I really need to get my newsletter out.

myser

  • I explained the situation in detail to my hosting company and their tech support said to use:

    /usr/local/bin/php -q /home/myaccountname/domains/mysitename.com/public_html/elggfolder/name_of_the_cron_file.php

    Following your last example do you mean I need to replace "name_of_the_cron_file.php" with *5/**** or with /cron/fiveminute

    ?

  • No.

    The command to execute is "wget" (http://en.wikipedia.org/wiki/Wget). This is a command line tool that's normally used to retrieve content from a server but in this case it's used to trigger the execution of Elgg's cron scripts (and including the -spider paramter there's no data retrieved). There's no php script you can call directly. You need to visit some specific pages on your site (e.g. http://site.url/cron/fiveminute/) for the jobs to be executed. You could either enter these urls in your browser and execute the jobs manually or you use a tool like wget that visits these pages and then triggers the execution automatically, if wget gets executed via a cronjob at specific intervals. The underlying execution of the real jobs (logrotate etc.) happens in Elgg internally.

    Take a look here: http://www.ipserverone.info/control-panel/directadmin/how-to-set-cronjobs-in-DirectAdmin-control-panel/

    They even include a "wget" command example when creating a cronjob via the Direct Admin control panel on this page. Select the time intervall for example for the fivemin cronjob in the corresponding fields (minute: "*/5" and the rest "*") and then enter "/usr/bin/wget --spider --output-document=/dev/null http://site.url/cron/fiveminute/ >/dev/null 2>&1" in the command field. Of course, you need to adjust the "site.url" part of the command parameter. For each of the other cron intervals you create a separate cron entry via the Direct Admin control panel: select the correct time intervals and the add the command (with adjusting the "fiveminute" part of the url to suit the cron interval - minute, hourly, daily etc. as listed on http://docs.elgg.org/wiki/Cron).

    If in doubt, ask your hoster about the availability of the "wget" command (availability on your server, path to it).

  • Very many thanks iionly for your patience with me. The code you gave in last message worked perfectly and all my 150 newsletters were sent out, (apparently in one go, not in groups every 5 minutes - I guess maybe that's for higher message volume).

    I did not enter the timing in the fields and put

    "/usr/bin/wget --spider --output-document=/dev/null http://mysite.url/elggfolder/cron/fiveminute/ >/dev/null 2>&1"

    in the command line. Eureka!!!  Now I know how to make the weekly cron jobs for log rotate and garbage collector.  I think either you or I (with your permission) should put your code in the new documentation knowledgebase that's being written for Elgg. I'm sure many Direct Admin users would bless you for it. Again many thanks, Jon