Author Topic: cron jobs  (Read 2821 times)

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
cron jobs
« on: October 27, 2008, 04:26:30 PM »
Hello folks  ;)
.. We have a problem with cron jobs .. our server will only allow a cron to be run once an hour!

But its via a scheduled task and we cant evan get that to work!
.. the cron line we are using is:
/usr/bin/php -f /home/sites/our-site/public_html/etano/tools/cron/cron.php
But it just wont work .. we have checked permissions and all seems fine.

But when we run:
http://our-site/etano/tools/cron/gen_blogs_full.php
it updates .. and works fine.

Any ideas ???? on how to solve this problem would be greatfully recieved ..  ;)

The site is up and running .. just need to solve this cron problem.

Is it possible to have cron run remotely .. and if so .. how do we do this ! and who do we get to do it ?

Thanks in advance

Johnny

(Note: We are using the new Etano software)

maverick

  • Administrator
  • Veteran Member
  • *****
  • Posts: 3005
  • Karma: +210/-7
    • Maverick Webworks
Re: cron jobs
« Reply #1 on: October 27, 2008, 04:45:41 PM »
Check out the Etano installation guide and refer to the section titled "Alternative ways to run the periodic task"

http://www.datemill.com/etano/wiki/doku.php?id=installation

That may provide some answers you're looking for.

 

Fusion Responsive Template & Free Mods
http://www.maverickwebworks.com
DO NOT PM me asking for personal help. Post your problem or request in the forums so the entire community can contribute and benefit.

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
Re: cron jobs
« Reply #2 on: October 27, 2008, 05:24:58 PM »
Thanks for the reply maverick  ;)
... Yeah i read that, still cant get it to work  :(

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
Re: cron jobs
« Reply #3 on: October 28, 2008, 02:51:51 PM »
Hello folks  ;)
We contacted our server regarding the cron error and they responded with this reply:
-------------------
It's going to be a scripting issue I'm afraid (which we don't provide support for), it'll probably be something small you've missed in the

script. Calling scripts from CRON's is different than from the web via HTTP as to how it's interpreted and things within the script must be

very specific.

For instance, I took a quick look, and here ->

require_once dirname(__FILE__).'/../../includes/common.inc.php';
require_once dirname(__FILE__).'/../../includes/admin_functions.inc.php';

Instead of using relative paths, try using the full server location eg

'/home/sites/our-site/public_html/etano/includes/common.inc.php'
----------------------

I have no knowledge of script writting so im unsure where to start the address from! .. is it ?

require_once dirname(__FILE__).'/home/sites/our-site/public_html/etano/includes/common.inc.php';

Thanks in advance

Johnny

keith

  • Veteran Member
  • *****
  • Posts: 500
  • Karma: +4/-0
    • MatchMeUK - Free Dating
Re: cron jobs
« Reply #4 on: October 28, 2008, 05:31:46 PM »
Hi,

Who are you hosted with, and have you tried setting cron in ssh root


lkeith

admin2

  • Guest
Re: cron jobs
« Reply #5 on: October 29, 2008, 01:51:59 AM »
Well, you just gave us the cause of the problem: you are only allowed 1 cron job per hour. When I tested it for you, it allowed me to set a 5 minutes job in the control panel interface so I didn't know that you're only allowed one per hour. Even the previous jobs that were set in there (from DSB) - there was a 5 minute one and a 10 minute one.
So if there's no way to have that job run every 5 minutes then you have 2 solutions:
1. move to a host that allows you to do this (anyone with cPanel).
2. remote cron jobs. They're not as reliable as local jobs because it involves communication between our server and yours over internet but it is reliable enough to use it if you don't want to move. We have a couple of customers using it and there has been no problem in a few months.

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
Re: cron jobs
« Reply #6 on: November 01, 2008, 01:43:24 PM »
Hi Dan
... Yes please
Could you set up our cron jobs on your server  ;)

Really dont need the hassle of moving to a new host ..

Many thanks

Johnny

PS: Thanks the reply lkeith .. looks like we are sorted  :)

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
Re: cron jobs
« Reply #7 on: November 01, 2008, 05:38:04 PM »
Me again  ;)
.. Can ya let me know when its done! .. so i can get it online  :)

Thanks again

Johnny

admin2

  • Guest
Re: cron jobs
« Reply #8 on: November 03, 2008, 09:10:53 AM »
Apply using this form and I can set it up this evening.

AKP

  • Confirmed Member
  • **
  • Posts: 8
  • Karma: +0/-0
Re: cron jobs
« Reply #9 on: March 31, 2009, 12:15:29 PM »
I am the owner of the site which Johnny was working on. Since opting for the remote running of the cron job, all has run smoothly for a small monthly fee, definitely an attractive option to moving host..Adrian.

wre2wre

  • Confirmed Member
  • **
  • Posts: 5
  • Karma: +0/-0
Re: cron jobs
« Reply #10 on: September 09, 2017, 12:47:53 AM »
what about using this free service and run ecery 1 minute corn jobs?

www.cron-job.org