Need a nice logic


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need a nice logic
# 1  
Old 11-24-2011
Java Need a nice logic

Hi all,

Given a scenario there is a folder and files will be coming into the folder at random time.The files that came in need to be mailed. And an important thing no file should be missed out as well as no file should be sent twice.

One idea is that we can schedule a script that runs for every 30 mins and does this. But as -mmin is not a standard option, using -mmin to find the files modified in last 30 mins is not good.

Had one more idea, that is can have a log file that has the contents of the the files that has been mailed. Can get the list of files that has been modifed after the log file with -newer optin with find and mail them.For the first just run the script and it'll will create a empty log file and nothing will be mailed for the first time.

any suggestions..?
# 2  
Old 11-24-2011
Can't you move the file to some directory after it has been mailed?
# 3  
Old 11-25-2011
No.. There will be some other programs using the files so we cannot move the files..
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Programming

nice command and nice() system call

Hi I want to implement the nice command in the shell that I am building. I came to know that there is a corresponding nice() system call for the same. But since I will be forking different processes to run different commands typed on the command prompt, is there any way I can make a command... (2 Replies)
Discussion started by: tejbuch
2 Replies
Login or Register to Ask a Question