LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Incron Job not executing (https://www.linuxquestions.org/questions/linux-newbie-8/incron-job-not-executing-4175461976/)

Bharath_ 05-14-2013 04:34 PM

Incron Job not executing
 
Hi,

I want to maintain the same version of files on all my servers and to do this i am using master and slave pattern. If there is any changes made on the master file system i want the changes to be syncronized with the slave systems. I am using incron to monitor the file system on the server. In the incrontab -e i have added a command which will run a shell script if there is any changes made to folder on master which is monitored. But when i make changes on the folder in master command associated with incrond is not getting execute. Can anyone tell me how can i debug this.


line in incrontab -e : /usr/share/nginx/html IN_ALL_EVENTS sh /root/scripts/sync.sh

full path to the file that has to be monitored on master is : /usr/share/nginx/html

and when i try to see the log using the command : tail -f /var/log/cron

I get:

May 14 16:18:26 Nginx1 incrond[16918]: (root) CMD (sh /root/scripts/sync.sh)
May 14 16:19:05 Nginx1 incrond[16918]: stopping service
May 14 16:19:11 Nginx1 incrond[17027]: starting service (version 0.5.8, built on Jan 6 2009 20:19:42)
May 14 16:19:11 Nginx1 incrond[17028]: loading system tables
May 14 16:19:11 Nginx1 incrond[17028]: loading user tables
May 14 16:19:11 Nginx1 incrond[17028]: loading table for user root
May 14 16:19:11 Nginx1 incrond[17028]: ready to process filesystem events
May 14 16:19:14 Nginx1 incrond[17028]: (root) CMD (sh /root/scripts/sync.sh)
May 14 16:19:14 Nginx1 incrond[17028]: (root) CMD (sh /root/scripts/sync.sh)
May 14 16:19:20 Nginx1 incrond[17028]: (root) CMD (sh /root/scripts/sync.sh)

Tinkster 05-14-2013 09:19 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

http://www.linuxquestions.org/questi...7/#post4951097


All times are GMT -5. The time now is 03:14 PM.