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

UNIX Shell Script

Status
Not open for further replies.

rvnair

Programmer
Jul 16, 2013
1
IN
Hi,

How we can schedule a script which will automatically triggers when a particular file get created?
 

You can check for the existence of the file with a crontab script.
[bomb]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
To create a particular file at a particular time, put this in your crontab...

Code:
0 5 * * * /bin/touch /path/to/file.txt

That will create the file [tt]/path/to/file.txt[/tt] at 5am every day. Change it to suit your needs.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top