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? |
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 |
All times are GMT -5. The time now is 01:39 PM. |