LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 05-14-2013, 05:34 PM   #1
Bharath_
LQ Newbie
 
Registered: May 2013
Posts: 7

Rep: Reputation: Disabled
Question 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)
 
Old 05-14-2013, 10:19 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command associated with Incron not getting executed Bharath_ Linux - Newbie 3 05-15-2013 12:44 PM
MySQL backup cron job not executing correctly lakridserne Linux - Server 3 03-02-2011 10:10 AM
crontab job not executing.... mia_tech Linux - Newbie 6 08-31-2009 03:42 PM
incron experiences - what do you think? billymayday Linux - Software 4 11-20-2008 11:17 AM
Issues while executing shell scripts through Cron job paragkalra Programming 8 08-02-2008 02:18 PM


All times are GMT -5. The time now is 07:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration