LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-01-2005, 06:52 AM   #1
parthcorp1
LQ Newbie
 
Registered: Feb 2005
Posts: 1

Rep: Reputation: 0
need help with cron job


#!/bin/bash

find /home/ftp/outgoing/MIS/ -exec touch -c --no-create {} \;
find /home/ftp/outgoing/cfsan/ -exec touch -c --no-create {} \;
find /home/ftp/outgoing/CRC/ -exec touch -c --no-create {} \;

echo "Files to be removed $(date +%m%d%y)-----------------------------------">>/home/ftp/outgoing/clean.log
find /home/ftp/outgoing/ -ctime +30 -exec ls -lh >>/home/ftp/outgoing/clean.log {} \;
find /home/ftp/outgoing/ -ctime +30 -exec rm -rf {} \;
[root@ftp bin]#



When I run the cron job I get error message

Output from command /root/bin/outclear.ftp ..

/bin/sh: /root/bin/outclear.ftp: bad interpreter: No such file or directory



what is wrong with the cron script??

Help.
 
Old 02-01-2005, 09:07 AM   #2
draxen
Member
 
Registered: Nov 2004
Posts: 43

Rep: Reputation: 15
How does the cron table look like?
One possibility that comes to my mind is that cron cannot find your script, maybe you're not using absolute path in the cron table?
 
Old 02-01-2005, 12:37 PM   #3
scissors
Member
 
Registered: Aug 2004
Location: Seattle
Distribution: Red Hat es and as, Solaris, Fedora, Debian, Tru64
Posts: 45

Rep: Reputation: 15
I have seen this when I mistype the interpreter invocation:

#!/bin/bash

check that /root/bin/outclear.ftp is executable. It sort of appears that you are trying to invoke /root/bin/outclear.ftp as an interpreter, please post this portion of your crontab.

What you have already posted, is this /root/bin/outclear.ftp in its entirety?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron Job petenyce Linux - Newbie 5 10-11-2005 05:03 PM
cron job working2hard Programming 6 07-28-2004 10:12 PM
cron job ? johnyy Linux - Software 3 12-10-2003 07:00 PM
Cron Job imanahmadi Linux - Newbie 1 07-04-2003 12:39 AM
cron job? luap Linux - Software 2 03-16-2003 09:48 AM


All times are GMT -5. The time now is 07:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration