The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem with cron job solne SUN Solaris 7 01-18-2008 08:57 PM
CRON problem rrlog AIX 1 01-15-2008 02:22 PM
cron job problem mokkan SUN Solaris 4 12-22-2007 04:25 PM
cron problem! blowtorch UNIX for Advanced & Expert Users 4 03-08-2006 01:12 AM
cron problem VPN UNIX for Dummies Questions & Answers 2 04-16-2004 07:27 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 08-18-2008
kerpm kerpm is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 9
cron problem

I'm using Red Hat and I need to get cron working and I'm not sure what the problem is. As a test I've done the following:

1) In /etc/cron.d I've created a file called date with the following contents
2) */1 * * * * root date >> /root/thedate
3) This works perfectly. It sends the date every minute to /root/thedate with no problem


Then when I tried the following, it would not work:

1) In /etc/cron.d I changed the file named "date" to contain the following:
2) */1 * * * * root /root/date.sh
3) The contents of /root/date.sh is the following:
#!/bin/sh
date >> /root/thedate
4) I chmoded /root/date.sh to 700 and was able to run it by executing ./date.sh
5) However, crond would not run this cron job and I am confused

Any help is appreciated.
  #2 (permalink)  
Old 08-19-2008
wardy wardy is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 1
maybe cron isn't running as root

you chmod'd to 700 so that means only root can do anything with the file.

try chmod 755 to see if that helps
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:15 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