The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cron question moe2266 Shell Programming and Scripting 4 11-19-2007 02:08 AM
cron question moe2266 Shell Programming and Scripting 4 08-20-2007 04:09 PM
question about cron hcclnoodles UNIX for Dummies Questions & Answers 1 12-08-2006 09:02 AM
CRON Question DenD AIX 2 01-17-2006 01:59 PM
cron question ted Shell Programming and Scripting 2 08-02-2004 05:13 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-29-2008
dannyd dannyd is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 20
cron job question

I created a cron script that runs on the command line but not in crontab. What could be causing it to not run ?
  #2 (permalink)  
Old 02-29-2008
dannyd dannyd is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 20
I check the cron log and had this line..what does it mean ?

Feb 29 13:30:01 COM1 crond[24755]: (root) CMD /usr/local/cron/logs)
  #3 (permalink)  
Old 02-29-2008
yvsanil yvsanil is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 2
Thumbs up

Please put the command in executables(Tick)..for example
'cp /path /newpath'
Please try
  #4 (permalink)  
Old 02-29-2008
dannyd dannyd is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 20
Sorry I dont understand. Put what command and where is executables ? I'm completely lost.
  #5 (permalink)  
Old 03-01-2008
timontt timontt is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 44
Hi dannyd,

Basically, just ensure that your script is executable first then place it in crontab.

eg. my script name is dailyreboot.sh
Edit crontab and specify running timing with your script name
# crontab -e

Editing mode, insert like
# to reboot server everyday
00 03 * * * /root/adm/bin/dailyreboot.sh 2&1> /dev/null

To save and exit
:wq!

You can check in your cron log, whether it get executed on specified time...

Hope this will help.
  #6 (permalink)  
Old 03-03-2008
dannyd dannyd is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 20
I did all that.

For some reason it executes fine on the command line but not as a crontab.

When I run it in the command line it says Interactive mode enabled. What does that mean ?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0