LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Schedule on file creation (https://www.linuxquestions.org/questions/linux-newbie-8/schedule-on-file-creation-311472/)

TheLostPropet 04-09-2005 02:50 PM

Schedule on file creation
 
Hello All, I am new to linux and i am looking to run a script i have created when a certain file is created. I was going to use the crontab to run my script every minute and use an if statement in the script to determine wether the file exists and then run the procedure if it does. This seems a bit overkill tho and i was wondering if there is a better way to do this? Thanks in advance.

Phil

jailbait 04-09-2005 04:08 PM

"i am looking to run a script i have created when a certain file is created. I was going to use the crontab to run my script every minute and use an if statement in the script to determine wether the file exists and then run the procedure if it does. This seems a bit overkill tho and i was wondering if there is a better way to do this?"

Why can't the program or script which creates the file also run the script that you plan to put in crontab?

-------------------------
Steve Stites

TheLostPropet 04-09-2005 05:20 PM

Sorry i should have explained my situation a little better, the program that creates the file will be running on a windows server, using a share the programs creates the file to trigger the running of the script.


All times are GMT -5. The time now is 08:01 PM.