CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Automate civimail.cronjob.php in IIS 7
Pages: [1]

Author Topic: Automate civimail.cronjob.php in IIS 7  (Read 5296 times)

bluebattery70

  • Guest
Automate civimail.cronjob.php in IIS 7
January 14, 2010, 02:22:39 pm
I am running CiviCRM on an IIS 7 server. I am using civimail to send out mini eblasts to some lists. I want to automate the civimail.cronjob.php so that i dont have to run manually run, http://<site>/index.php?q=civicrm/mailing/queue&reset=1, every time. I have been looking around these forums and others for the past several days for some information how to do this but cant really seem to find anything. I was wondering if anyone could help me out or point me in the right direction. It would be greatly appreciated. Thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Automate civimail.cronjob.php in IIS 7
January 14, 2010, 03:39:38 pm

check:

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviMail+Installation#CiviMailInstallation-SettingUptheCronJob

dont know what the cron equivalent is on windows, but i suspect there are equivalent programs

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mrl586

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 4.0
  • CMS version: Drupal 7.0
  • MySQL version: 5.5.9
  • PHP version: 5.3.5
Re: Automate civimail.cronjob.php in IIS 7
January 14, 2010, 07:53:42 pm
Quote from: Donald Lobo on January 14, 2010, 03:39:38 pm

check:

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviMail+Installation#CiviMailInstallation-SettingUptheCronJob

dont know what the cron equivalent is on windows, but i suspect there are equivalent programs

lobo

I think that Scheduled Tasks is cron equivalent on Windows.

bluebattery70

  • Guest
Re: Automate civimail.cronjob.php in IIS 7
January 15, 2010, 08:51:25 am
I have read the scheduled task is essentially cron for windows. I tried creating a scheduled task to run  http://<site>/index.php?q=civicrm/mailing/queue&reset=1 but then the task wasnt able to complete on its own because it wasnt logged in. Do i need to create a script to run civimail.cronjob.php and put that in scheduled tasks? Im new to civicrm but pretty familiar with Drupal. The only difference is that the other instances i have of drupal are on linus and this one is on windows, so im kinda clueless. Any help is appreciated.

bluebattery70

  • Guest
Re: Automate civimail.cronjob.php in IIS 7
February 04, 2010, 08:54:46 am
Does anyone not have anymore suggestions. I really wish my civimail was on a linux server but it has to be on IIS 7 so sadly im stuck. Can anyone please help me? It would be a life saver

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Automate civimail.cronjob.php in IIS 7
February 04, 2010, 11:13:49 am

might want to hire someone from: http://civicrm.org/professional/

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

bluebattery70

  • Guest
Re: Automate civimail.cronjob.php in IIS 7
February 04, 2010, 02:08:34 pm
I have considered that but it is hard since we are trying to keep costs as low as possible because we are a non-profit org.

Another thing that i have tried is following this: http://forum.civicrm.org/index.php?topic=793.0 and then using this method: http://www.devx.com/DevX/Article/39900/1763/page/3 to implement it in task scheduler. Task scheduler says the tasks completes but mail is never sent out. 

To see why i opened command prompt and used "wget http://<server name>/drupal/sites/default/modules/civicrm/bin/civimail.cronjob.php?name=<login>&pass=<password>&key=<ourkey>" and this returns that it connects fine but then says cannot write to 'civimail.cronjob.php' permission denied. Any ideas there? Thanks again

Keith

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
Re: Automate civimail.cronjob.php in IIS 7
November 03, 2010, 09:18:11 am
Here is what I have done. It seems to work properly

1. download wget for windows (http://gnuwin32.sourceforge.net/packages/wget.htm) and load it somewhere on your system. In my case, I placed it in c:\tools
2. Create a "post-data" file containing my authentication data. I called my civi.txt with only the following contents:

key=mysitekey&name=mylogonname&pass=mypassword

3. Create a batch file for this process. My contains the following:

c:\tools\wget -c -o civimail.log --post-file civi.txt http://mydrupalsite.com/sites/all/modules/civicrm/bin/civimail.cronjob.php
del c:\batch\civimail.cronjob.php


4. Place the 2 files (civi.txt and civimail.batch) anywhere in your system. You can test by running the batch file and checking for errors. You may want to remove the del c:\batch\civimail.cronjob.php line until you get it working as this file will contain any authentication errors. I added the del line just to keep my folder clean.

5. Set up a task using windows task scheduler that runs the batch file. (I will not detail how to do that here.)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Automate civimail.cronjob.php in IIS 7

This forum was archived on 2017-11-26.