Cron jobs

  • dannyd
  • Newbie
  • Newbie
  • dannyd
  • Posts: 5

Post 3+ Months Ago

Hi Im trying to run a cron job using crontab but for some reason it doesnt work however it works on the command line .. any ideas why this happens ?
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Could be a permission issue.

For instance if you're doing it from the command line as root & setting the cron for a user with insufficient permissions.
  • eggi
  • Novice
  • Novice
  • eggi
  • Posts: 30

Post 3+ Months Ago

Hey There,

Also check to make sure that your script isn't assuming anything, like running a command that's in your user PATH, but not in cron.

For instance:

apachectl

may run fine from the command line, but fail in cron, but:

/usr/local/apache1.3/bin/apachectl

would succeed (assuming you installed it there, of course ;)

It's generally a good idea to use fully qualified paths to all commands in a script you'll run in cron. A lot of the time you don't have to, but it removes that element from your troubleshooting if you do.

Hope that helps :)

, Mike
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

As a rule, I always qualify commands with a full path in cron entries.

Could you be more specific as to what the entry is doing and display your crontab?
  • vijayan
  • Beginner
  • Beginner
  • vijayan
  • Posts: 52
  • Loc: india

Post 3+ Months Ago

Hi,

can you post that what is syntax you have put in crontab file.


*************
Vijayan Linux
*************

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.