If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Cron Job Question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-03-03, 22:33
imanahmadi imanahmadi is offline
Registered User
 
Join Date: Jul 2003
Posts: 4
Cron Job Question

I have a question about the use of cron job. I understand that it executes a process at a certain schedule, but is there a way to execute a process once there has been a change in a directory or file? If so, how would one do such thing? If not, what can be done to execute a process once a change has been made in a directory or file?
Reply With Quote
  #2 (permalink)  
Old 07-04-03, 06:05
sypher sypher is offline
Registered User
 
Join Date: Jan 2003
Location: Scotland
Posts: 17
Re: Cron Job Question

Quote:
Originally posted by imanahmadi
I have a question about the use of cron job. I understand that it executes a process at a certain schedule, but is there a way to execute a process once there has been a change in a directory or file? If so, how would one do such thing? If not, what can be done to execute a process once a change has been made in a directory or file?
What kind of change are you talking about? If your waiting for a directory or file to change then create a script that creates a parameter file that gets updated when the file is updated. Say 0 means not updated and 1 means it is, when it is set to 1 run the other process from the script.

You can check if the file is updated doing a du -sk on the filename, if this greater then up date the parameter file.

Last edited by sypher; 07-04-03 at 06:29.
Reply With Quote
  #3 (permalink)  
Old 07-09-03, 19:01
aruneeshsalhotr aruneeshsalhotr is offline
Registered User
 
Join Date: Jul 2003
Location: US
Posts: 314
Lightbulb Cron Job

Hi
A simple way to do the cron job is to run the cron job every minute which internally would call a command which checks the file for any changes.
If this doesnt seem to fit your requirement, you could use trigggers to perform such an operation.
Aruneesh
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On