automated processes


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers automated processes
# 1  
Question

Hi,

I have written a script that looks at a target directory and performs actions based on what kind of file has been ftp'd to said directory. My thoughts are to schedule this in my crontab, quick and easy. But it would be nice if the script kicked off automatically every time a file was sent to the target directory. Is there any way to do this beside creating a daemon (which is a bit out of my range at this point)? I'm thinking probably not, but I might as well ask.

Thanks,
kristy
# 2  
Tools

You might use the crontab again. You check for the files in the directory at certain times and if there is a file you perform your tasks on the file. Once done you remove the file and let the crontab scan it for new file at certain time. The script for that you will have to ask one of those experts unless you know how.
gp
# 3  
Hammer & Screwdriver

It seems using the crontab would be the obvious choice, I could schedule my script to run every fifteen minutes. The script itself takes care of performing tasks, removing old files, etc... Just wanted to see if there was something else I could employ. Thanks Smilie
-kristy
# 4  
Tools

Well, if you think about it it is much easer to have something to be a sleep and get into action only when needed. It takes the minimum resources and so keeping your system well up. If youre familiar with scheduling then you got the idea.
gp
This User Gave Thanks to softarch For This Post:
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #57
Difficulty: Easy
In a Database Management System (DBMS), the content and the location of the data is defined by the meta data.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies

2. Shell Programming and Scripting

Automated Login?

hi everyone, btw, this is my first post and I have done extensive searching before posting so here's the problem: I need to be able to do two things from the dll I'm writing. 1.) move a file from our production server to our repository server 2.) verify that the file exists in the... (7 Replies)
Discussion started by: jshapaka
7 Replies

3. Solaris

Identifying and grouping OS processes and APP processes

Hi Is there an easy way to identify and group currently running processes into OS processes and APP processes. Not all applications are installed as packages. Any free tools or scripts to do this? Many thanks. (2 Replies)
Discussion started by: wilsonee
2 Replies

4. Shell Programming and Scripting

i want automated script

echo "Enter your choice :\c" read num case $num in . 1)"${TEST_HOME}"/ctrl_extract.ksh 1 ;; 2)"${TEST_HOME}"/ctrl_extract.ksh 2 ;;3)"${TEST_HOME}"/ctrl_extract.ksh 3 ;; 4)"${TEST_HOME}"/ctrl_extract.ksh 4 ;; 5)"${TEST_HOME}"/ctrl_extract.ksh 5 ;;... (3 Replies)
Discussion started by: arghya_owen
3 Replies

5. UNIX for Advanced & Expert Users

Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go? Thank you Richard (4 Replies)
Discussion started by: ukndoit
4 Replies

6. UNIX for Advanced & Expert Users

help for automated script

Hi ALL: I need to write a script that will start bunch of servers. and these servers each has a sudo account and they need a passowrd. I dont know where to start and look. Can you please give me some hints or some sample code. Thanks in advance. splax (4 Replies)
Discussion started by: splax
4 Replies

7. Shell Programming and Scripting

automated plotting

Hi, I would like to make a lot of plots with for instance xmgrace and don't know how. I have a directory with about 500 data files with the same structure and I want to plot always the same columns. I don't know how to call xmgrace to produce a, say, gif plot of the columns 3 and 4 of... (2 Replies)
Discussion started by: pau
2 Replies

8. UNIX for Advanced & Expert Users

Automated FTP

My requiremnet is to write a FTP script which will ftp a file to a specified ftp url. How can I automate the process usnig the unix cron. (11 Replies)
Discussion started by: shauche
11 Replies

9. UNIX for Dummies Questions & Answers

FTP automated?

If I wanted a machine to put a specific file onto another OS far across the internet via FTP - and I wanted to do it automatically not user intervented, how would I do that? Use the PUT command? The file name and position never changes, it gets overwritten and the system on the other end... (6 Replies)
Discussion started by: n9ninchd
6 Replies

Featured Tech Videos