Go Back  HTML Forums - Free Webmaster Forums and Help Forums > SERVER ADMINISTRATION > Unix Administration
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 05-20-2008, 04:10 PM
  #1
Novus Mortuus
Paladin (Level 15)
 
Join Date: Feb 2008
Posts: 389
iTrader: (0)
Novus Mortuus is an unknown quantity at this point
Cron Job

I;m not sure if you'll be able to help me or not, as it could be a problem with the path on the server but no-one's answering me on the host forum, so:

Having trouble setting up my first cron job.

* * * * * /public_html/aa/pieces/cron.php

Gives me:

/bin/sh: /public_html/aa/pieces/cron.php: No such file or directory

Same with:

* * * * * /www/aa/pieces/cron.php

When i go to the file and just copy paste the path..

* * * * * /home2/***/www/aa/pieces/cron.php

It gives me:

/bin/sh: /home2/***/www/aa/pieces/cron.php: Permission denied

What's the issue? As far as i can see that's the right path..

Last edited by Novus Mortuus : 09-13-2008 at 04:56 PM.
Novus Mortuus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 05-20-2008, 06:28 PM
  #2
Novus Mortuus
Paladin (Level 15)
 
Join Date: Feb 2008
Posts: 389
iTrader: (0)
Novus Mortuus is an unknown quantity at this point
Never mind, i got it working with:

/usr/bin/php -a /home2/***/www/aa/pieces/cron.php

Last edited by Novus Mortuus : 09-13-2008 at 04:55 PM.
Novus Mortuus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-13-2008, 04:55 PM
  #3
Novus Mortuus
Paladin (Level 15)
 
Join Date: Feb 2008
Posts: 389
iTrader: (0)
Novus Mortuus is an unknown quantity at this point
Another Cron Job problem..

I have a file that i want to run every 2 hours, now this is what i have in the cron job section (With some bits ***'d out):

0 */2 * * * /usr/bin/php -a /home2/***/includes/***_cron.php

I have tried including that file and running it in the browser and it works fine. And i have other cron jobs set up in an identical way that work, but for some reason this one just isn't doing anything. It's not even sending me the email with a success/error message. Just nothing at all..

I'd show you the contents, but it's not important since it works fine when i run it in the browser, but briefly:

- I have another file included in it which connects to the db
- Some data is extracted and added up
- New data is then inserted into another field
- New data is exracted and written to a text file, which is then included on another page.

So basically, that page with the text file included should then update every 2 hours.

Is there any chance anyone can see anything wrong with the unix path..Or know why it might not be working?

Thanks.
__________________
Slowly teaching myself html, css, php, mySQl, etc...
Novus Mortuus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-30-2008, 01:45 PM
  #4
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
AFAIK -a is the wrong option to use here.
http://articles.techrepublic.com.com...1-5889263.html

-f is what your looking for.
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-05-2008, 03:02 AM
  #5
bradoeoe
Swordman (Level 9)
 
bradoeoe's Avatar
 
Join Date: Sep 2008
Posts: 83
iTrader: (0)
bradoeoe is on a distinguished road
i havent set up any cron jobs yet does anyone have any examples for me to use?
bradoeoe is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-05-2008, 09:50 AM
  #6
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
bradoeoe do you have access to shell?
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-05-2008, 04:54 PM
  #7
bradoeoe
Swordman (Level 9)
 
bradoeoe's Avatar
 
Join Date: Sep 2008
Posts: 83
iTrader: (0)
bradoeoe is on a distinguished road
yup i no how to set them up asked my friends dad so dont worry i got it
bradoeoe is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 08:12 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.