LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-06-2003, 09:36 AM   #1
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Rep: Reputation: 30
Question crontab question


what is the difference between running a cron job like so:

#########################################################################
# look for hacks at 12:30am daily
#########################################################################
30 0 * * * sh /home/sysadmin/scripts/hacker_tracker


or like so:

#########################################################################
# look for hacks at 12:30am daily
#########################################################################
30 0 * * * /home/sysadmin/scripts/hacker_tracker

only difference is the "sh" specifier... this is of course a job in root's crontab...

you're thoughts?
 
Old 03-06-2003, 11:24 AM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
There is no difference I believe. The 'sh' simply says that you should run the hacker_tracker script. If the script is executable it will run by just specifying the path to it:

/home/sysadmin/scripts/hacker_tracker

If you were in the /home/sysadmin/scripts directory and just typed:

hacker_tracker

it would not execute. You would either have to add the sh:

sh hacker_tracker

or do:

./hacker_tracker
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab question kaplan71 Linux - General 4 07-18-2005 05:04 PM
Crontab question stefaandk Linux - Newbie 1 06-21-2005 08:31 AM
crontab question linuxtesting2 Linux - General 5 09-21-2004 05:54 PM
Crontab Question linear Linux - Software 4 01-11-2003 03:42 AM
Crontab Question? f117bomb Linux - General 5 02-09-2002 08:28 PM


All times are GMT -5. The time now is 05:04 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration