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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script

Status
Not open for further replies.

Gius

MIS
Sep 20, 2001
12
IT
Hi all,
I know that probably it is a simple question, but I am a newbie and I need help. I would like to schedule (it has to run every week) a script that check the existence of a file and then executes a command. I work on HP-UX 11.00.

Thank you very much


Gius
 
The script

#!/bin/ksh
if [[ -a filename ]] then
#Execute command here
fi

This checks if 'filename' exists and then executes your command on the next line.

To schedule the script look at man page on 'crontab' command

If you need more help with crontab post again.

 
As trunix says use crontab.
If it is one simple command you can use command directly in to the crontab.

Patel
 
CPU usage is high in system mode. I execute the top command but the process are in normal usage. How to identify who is the process responsible for this high usage? (D-230 hp-ux 10.20)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top