It stands for "inotify cron" system. Similar to the regular cron. The difference is that it handles filesystem events rather than time periods.
Questions tagged [incron]
50 questions
1
vote
1 answer
Adding job to incrontab with bash script
I'm using Ubuntu 16.04.1 LTS. I have installed incron and added root to incron.allow.
Normally I use sudo incrontab -e to add an incron job with the editor.
I need a command which can be run from a script which will add this line to the incrontab…

ekcell
- 105
- 2
- 11
1
vote
1 answer
incron and rsync not working
I have incron setup and working, i can see things being logged when files are changed.
I've tried my rsync command separately and that works fine. But when rsync in triggered by incron, nothing happens. i explicitly stated all the paths i could…

aibarra
- 409
- 1
- 7
- 17
1
vote
1 answer
Can I run inotifywait continually on a Linux Server without cron or incron
I create a git repo on the server for this dir. What I want to have is whenever there is a file moves into the directory, git push will push the repo and commit. I tried incrontab to execute a script. But seems like my server doesn't like incrontab,…

Kyle
- 135
- 1
- 12
1
vote
0 answers
Using rsync and incron together
we have a printer in our office and want to print out files which have been uploaded to the server via rsync.
Using incron with the following does not seem to work when uploaded from rsync:
/var/ordersFolder/orders IN_CLOSE_WRITE lp $@/$#
If I…

Alex
- 13
- 3
1
vote
0 answers
Weird issue restarting nodeJS server with incron
I have an inotify cron(Incron) that based on some changes to a text file, it should run a script.
Below is also my incrontab file
/home/pi/payload.txt IN_ATTRIB,IN_CLOSE_WRITE bash /home/pi/deploy.sh
To show that the incrontab is actually firing…

Bori Oludemi
- 63
- 7
1
vote
1 answer
incrond doesn't execute python script
I need to run a python script on every file, that is written into a specific folder.
So I created a file in /etc/incron.d/ and added the following line:
/srv/ftp IN_CREATE /usr/bin/python3 /srv/parser.py $@/$# >> /var/log/parser/incron.log 2>&1
the…

user1403333
- 98
- 12
1
vote
0 answers
Icron Upload directory watcher issue
I'm using CentOS on a VPS, I have installed Incron to watch a folder for file uploads, this is the incrontab -e command I'm using :
/home/user/public_html/uploads IN_CLOSE_WRITE /usr/bin/php /home/user/public_html/uploads/watcher.php $#
//The $@…

oussama kamal
- 1,027
- 2
- 20
- 44
1
vote
1 answer
Is there a way to use a wild card for this Incrond Inotify job?
This is what I currently have:
/js/main.js IN_MODIFY yui-compressor -o /js/main.min.js /js/main.js
Is there a way to do the above for all js files and sub folders in that folder? Something like this:
/js/*.js IN_MODIFY yui-compressor -o…

Howard
- 3,648
- 13
- 58
- 86
1
vote
2 answers
Linux: How to execute script when directory is written to
I'm a Linux novice and this seems like an easily solvable problem but I am at a loss for a solution. I want to execute a script when a certain directory is written to. I plan on having some sort of watcher on that folder that will trigger the…

user3195786
- 727
- 1
- 10
- 19
0
votes
0 answers
Access Incron file from filesystem
Usually, to edit the Incron jobs, you run incrontab -e and that opens the file editor, ...
I want to be able to dynamically update the file by running something like echo " IN_CREATE > incronfile".
I can not find the files under…

YanaT
- 53
- 7
0
votes
0 answers
Using incron to monitor for new directories/files
I have a script that outputs log files based on the year/month/date/time on a continuing basis with 15 minute rotations, so my directory structure looks like…

CEamonn
- 853
- 14
- 37
0
votes
0 answers
Incron doesnt run script
whenever someone writes a file to a ftp folder, I want to run a python script - which will parse the file and create a file with the output.
thus far using incron in centos 8.2 I wasn't able to do this.
when I tried to run it directly via python
i…

Nitzanougat
- 1
- 1
0
votes
1 answer
INCRON Event Script/Command Not Running
I upload a file from a bike computer to my PC via Dropbox (bike computer->Dropbox->my PC) and want to start a Python program when this happens. Today, I have a CRON entry that runs every 5 minutes looking for a file but I want this process to be…

Dave Nagy
- 21
- 7
0
votes
1 answer
Example of Using Flock in CURL to Avoid Multiple Parallel Instances
my bash script runs using incron whenever there is change in directory. However, since multiple images are uploaded, so I don't want to run multiple instances of CURL (that is used to build thumbnail cache of those images) while images are being…

Bilal Bhatti
- 15
- 5
0
votes
0 answers
Best modern method to run a script after receiving an ftp'd file
I just starting writing a new interface where I need to process a file after it has been ftp'd into my server. Is incron better than inotify in the long run or should I choose something else? BTW, I am using vsftpd.
p.s. I have already looked at…

neilrieck
- 11
- 4