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 »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Simple question about a php cron script
Pages: [1]

Author Topic: Simple question about a php cron script  (Read 1078 times)

airwaves

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 1
Simple question about a php cron script
November 07, 2009, 11:30:03 am
Hi There,

I would like to make a simple php script to be scheduled by a cron handler, but my knowledge of php is to basic I quess.
My hosting provider doesn't let me run php scripts with additional information behind the filename (so behind the "?").

http://www.in2xc.nl/administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php?name=cronxxxx&pass=xxxxxxxxxxx&key=baOqAxxxxxxxxxxVOcljDVDLiSiSuUR7
(bold isn't processed by the cron handler)


So I'm looking for a php script to run the civi crons

I came up with this file "cron.php"

<?php
@include("http://www.in2xc.nl/administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php?name=cronxxxx&pass=xxxxxxxxxxx&key=baOqAxxxxxxxxxxVOcljDVDLiSiSuUR7");
?>


But it doesn't seem to work. How do I know the cron does run?

Who can give me a push in the right direction?

Edwin

conductorchris

  • I post frequently
  • ***
  • Posts: 167
  • Karma: 9
    • Vermont Rail Action Network
  • CiviCRM version: 4.5.0
  • CMS version: Joomla 3.2.7
  • MySQL version: 5.5.32
  • PHP version: 5.3.26
Re: Simple question about a php cron script
December 01, 2009, 08:49:35 pm
can you put the location including username, password and key past the ? into a simple file and have the cron job point to that file?
Thanks to those who help create and enhance civiCRM!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Simple question about a php cron script
December 01, 2009, 09:50:49 pm
Hi,

If you are using a cron, you need to have a program that "click" on that link. wget or curl are two programs that are cron compatible browsers. Look at the documentation for the exact syntax.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Simple question about a php cron script

This forum was archived on 2017-11-26.