Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run command hourly

Status
Not open for further replies.

grannydmb

MIS
Dec 28, 2001
4
0
0
US
Hi I'm trying to run the following command every hour

perl /home/blah/SnortSnarf-020516.1/snortsnarf.pl /var/log/snort/alert -d /var/x/html/

I tried to setup a cron job to no avail. I also have no knowledge of a programming language. I guess if this question isn't answered I'm going to buy a book on programming. Thanks for any help. [afro]
 
i have a command that is run every 5 minutes. I simply put the command in a file called command.cfg, made the file exectuable, then had cron execute that file for me every 5 minutes.

I never could get cron to execute a command, but a file worked.
shnypr-small.gif
 
you can also put that command in /etc/crontab file :)
and don't forget to read manual page of cron.


regards,

Darmawan W. Anandita
---
ISP Network/System Administrator
M-Web Indonesia
-----
Darmawan W. Anandita
Network/System Administrator
M-Web Indonesia
 
use
crontab -e
it will open u the editor like vi
update it
#minute hour day month dayof the script to be
# week executed
#0-59) (0-23) (1-31) (1-12) (0-6 with
# 0=Sunday)

49 8 * * 1-5 /rajHello

this indicates that at 8.49 (* means not applicable) [so no day no month] every day (i:e from monday to friday) execute the file /rajHello

i hope you got what u r looking for
all the best

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top