Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    4

    Unanswered: 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?

  2. #2
    Join Date
    Jan 2003
    Location
    Scotland
    Posts
    17

    Re: Cron Job Question

    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 07:29.

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •