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
13
votes
2 answers
trouble getting incron inotify to work
so after alex answer here are my steps :
creating shell code
root@ip[/]# touch mylog.sh
root@ip[/]# nano mylog.sh
copying the code in the mylog.sh
#!/bin/bash
echo "File $1 created." >> /mylog.log
permission
root@ip[/]# chmod +x…

max
- 3,614
- 9
- 59
- 107
6
votes
4 answers
PHP script to upload file works in terminal, but not as automatical call with incron
I have a PHP script that uploads a document on a Sharepoint using cURL.
If I run the scipt in the terminal, the upload process works fine.
As I would like to automatically call the script whenever this file is changed, I use incron to detect a…

user2550641
- 317
- 4
- 18
4
votes
1 answer
incrond processes with shell script only exit if script exit code is 1?
Configuration
I have incrond 0.5.12 on CentOS 7.6 configured as follows in /etc/incron.d/example:
/var/tmp/dir IN_CREATE sh /root/incron_script.sh $@/$#
My /root/incron_script.sh simply contains the following: echo "$@" >>…

Jbezos
- 141
- 9
4
votes
2 answers
Incron doesn't do anything
I intstalled on a new vm with centos 7 incron.
I try to make it work but a simple command does nothing.
incrontab -e :
/home/test IN_CLOSE_WRITE touch "$@/$#.new"
nothing special
When i watch the log cron i see this :
May 13 11:40:57 Minions…

Shin5kai
- 43
- 6
3
votes
2 answers
Incron to copy new files
I have CentOS 7 with installed and running incrond.
As I understand incrond service can monitor /var/www/html/uploads/ and if a new file is uploaded - then using IN_CREATE we can do something. In my case I'd like to copy this new file to directory…

Serge
- 679
- 1
- 9
- 23
3
votes
1 answer
Incron feature in cloudlinux
Is incron is supported in cloudlinux ? After some googling I found that inotify is supported in cloudlinux. I couldn't find anything regarding to incron.

terminal ninja
- 396
- 1
- 11
2
votes
3 answers
watch a subdirectory with incron
I use incron for watch a direcory and run a script if a file is added.
In /etc/incron.d/ I have a file with:
/home/pat0/downloads IN_CLOSE_WRITE /var/www/owncloud/scanOC.sh pat0
It's ok when I add a file in /home/pat0/downloads
but, if I create a…

patol
- 136
- 2
- 10
2
votes
1 answer
Incron job is not being executed
I am using incron to monitor one of my file in /var/www/html directory.
output of incrontab -l
/var/www/html/test IN_ACCESS /home/intel/test.sh
This job is supposed to create a file in home directory, But when this job got executed (I opened the…

Khayam Gondal
- 2,366
- 2
- 28
- 40
2
votes
1 answer
Sub directory not getting copied to remote server using Rsync Linux
I tried with copying directory and files to remote Linux machine using rsync and incrontab.
It's working fine copying files to remote server.
Incrontab
/data/AMOS_SHARE/CHV_BE/ IN_MODIFY,IN_CREATE,IN_DELETE,IN_CLOSE_WRITE,IN_MOVE…

ashokhein
- 1,048
- 12
- 38
2
votes
1 answer
Using Zenity in a root incron job to display message to currently logged in user
Working on a script to auto-upload files that are placed in a directory, and then display a link to them to the currently logged in user. Users of the machine will be authenticated via LDAP.
The directory that is being watched by incron is outside…

tfmm
- 21
- 3
2
votes
1 answer
Run rake outside of rails_root/Incron doesn't run rake or bundle commands for rails
I have a rails application in /home/myuser/watchDir/myapp and an incron job set to watch the ../watchDir for modification. Once triggered, incron will run a script, /usr/local/bin/myscript.sh. This is the only place I could get incron to run a…

user3195786
- 727
- 1
- 10
- 19
2
votes
1 answer
incron and subliminial subtitle downloader
I've been looking for some time for an automatic subtitle downloader that would monitor new file in specific folder and I found out the CLI subliminal which is python based (this tool is really great if you don't know it).
Next step was to trigger…

zipp
- 1,116
- 13
- 27
1
vote
1 answer
Incron executes the script two times
I had a question about incron settings.
It looks i've got an event trigger with IN_MODIFY,IN_ATTRIB,IN_CLOSE_WRITE and I'd like to know if two options are triggered then that will execute the script twice? Because it seems the case today.
It looks…

Danard
- 69
- 8
1
vote
1 answer
incron does not respond to writing new files in a new folder. how do I fix it?
I want to track file changes (writing) in a folder. I made this parameter
/root/var/ IN_CLOSE_WRITE curl "https://api.telegram.org/......."
And if I load a file into the var folder, curl will work, but if I create a new folder at the beginning and…

accountnujen
- 61
- 6
1
vote
1 answer
incrontab $@ giving subdirectory and not watched directory
/tmp/target_dir IN_MODIFY,IN_CREATE,IN_MOVED_TO /tmp/script.sh $@
contents of script.sh
echo $1 > /tmp/script.log
on executing
cp -r some_dir /tmp/target_dir
contents of /tmp/script.log
/tmp/target_dir
on executing
cp some_file…

Ichchhit Baranwal
- 13
- 3