Unlike time driven cron, incrond uses inotify events—such as changes to a specific file—to trigger.
Questions tagged [incrond]
17 questions
5
votes
0 answers
How can I get incron to run a task when a file is overwritten?
I have data extract that gets updated by another server. I want to run a script whenever that file is updated.
My incron task looks similar to:
/path/to/file IN_MODIFY php -f /path/to/script.php -- -arg val -arg val
This task does not run when the…
![](../../users/profiles/99647.webp)
David R.
- 607
- 3
- 6
- 18
3
votes
1 answer
Setting up inotify (incron) to monitor several directories using asterisk
I am trying to create an entry in /etc/incron.d/ that'd monitor all changes done under the following directories:
/var/www/virtualhosts/dev.anuary.com/*/*/public/css
Now, I assume this should be as simple…
![](../../users/profiles/82338.webp)
Gajus
- 831
- 5
- 15
- 27
2
votes
2 answers
What resources is incrond using? What can make it stop?
Incrontab is set up to monitor approx. 10 directories. The only thing it does is that it starts a Bash script when the new file is received inside one of these directories. Approximately, one file is received every 5 minutes, in each of the dirs.…
![](../../users/profiles/374710.webp)
Muhamed Huseinbašić
- 121
- 6
2
votes
1 answer
Incron executes only once
I have an incron configured , in the incrontab. The event gets executed only once after the reload and incron disables the watch after that and the event does not get triggered by incrontab table looks…
![](../../users/profiles/241783.webp)
Prashanth Ganesh
- 43
- 5
2
votes
2 answers
Run a script as root from apache
I would like to update my hosts file and restart dnsmasq from a web interface (php/apache2). I tried playing around with suid bits (the demonstaration). I have both apache and dnsmasq running on an EC2 instance.
I understand that Linux ignores the…
![](../../users/profiles/85585.webp)
Lord Loh.
- 1,049
- 3
- 15
- 24
2
votes
2 answers
incrontab watching files uploaded through vsftpd
I have a process where users ftp particular files to /home/ftp/file1.txt & /home/ftp/file2.txt any given time of the day. I setup incrontab with the following:
/home/ftp/file1.txt IN_CLOSE_WRITE myCustomCMD
/home/ftp/file2.txt IN_CLOSE_WRITE…
![](../../users/profiles/98354.webp)
KinGBin
- 21
- 3
1
vote
1 answer
incrond is firing my rclone but the rclone is not working... but from the command line the rclone command works fine
So in my incrond I have the following:
/home/mounts/localdisk/LINUXBACKUP/binlog/ IN_ATTRIB,IN_CREATE,IN_CLOSE_WRITE rclone sync /home/mounts/localdisk/LINUXBACKUP/binlog/ GoogleDLinux:LINUXBACKUP/BINLOGS/
in my sys.log I I can see in my syslog…
![](../../users/profiles/544339.webp)
BostonMacOSX
- 141
- 5
1
vote
0 answers
CENTOS 7 - incrond service doesn't start properly on reboot
I'm having some trouble with incrond not starting properly after a reboot.
If I check the service, everything looks ok:
$ systemctl is-active incrond.service
active
$ systemctl is-enabled incrond.service
enabled
But the service isn't working -…
![](../../users/profiles/429644.webp)
CoAstroGeek
- 111
- 3
1
vote
1 answer
Detect which scripts are using old interpreters
I have a few Debian machines with some nearly-orphaned script interpreters, for example /bin/bash3 and /usr/bin/perl510. How can I detect those scripts that still have the aforementioned interpreters in their shebang…
![](../../users/profiles/151785.webp)
Perleone
- 135
- 8
1
vote
0 answers
Incrontab does not execute command
I have copied this question over here from unix.StackOverflow
When I use incrontab out of the box, I mean no changes,
I get no result, as if the cmd was not executed.
my incron line is :
/crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos…
![](../../users/profiles/218632.webp)
user3545361
- 11
- 1
1
vote
1 answer
cron takes UTC time instead of local time
I've a script set in cronjob to run at 00 hours but it runs 5 hours earlier ie at 7PM local of earlier day. I mean it was supposed to run at local 00 hours of local time but it ran at 00 hours of UTC/GMT.
timedatectl output
…
![](../../users/profiles/544748.webp)
arun kushwaha
- 11
- 2
0
votes
1 answer
Incrond | Use $HOSTNAME environmental variable
I'm using Incrond to check a folder for file changes which triggers a Rsync job to our storage server. This configuration is deployed through Puppet, and therefore would like to use the $HOSTNAME variable in the destination path so it writes to it's…
![](../../users/profiles/499756.webp)
user10075632
- 3
- 1
0
votes
2 answers
Running python script in incrontab in Debian
I have a user, dropbox, that runs the Dropbox daemon, I want to monitor the directories in the Dropbox directory for new files and run a python script when they appear.
I have the python script that I know works:
$ /home/dropbox/monitor.py
Trying to…
![](../../users/profiles/110076.webp)
WilliamMayor
- 141
- 1
- 1
- 6
0
votes
1 answer
What is wrong with my Watcher (incron-like) daemon?
I have installed Watcher this way: both watcher.py and watcher.ini are located in /etc
I also installed pyinotify and it does work when I use python -m pyinotify -v /var/www
However, I want to use the daemon and when I start watcher.py, I get weird…
![](../../users/profiles/123398.webp)
ericd
- 213
- 1
- 10
0
votes
3 answers
debian symlink existing daemon incrond to start at boot
I'm triying to start the incron daemon "incrond" at boot but doesn't work.
I have done :
ln -s /usr/sbin/incrond /etc/init.d/incrond
chmod 755 /etc/init.d/incrond
update-rc.d incrond enable
But no "incrond" pid is running there.
Question
Shall I…
![](../../users/profiles/72358.webp)
hornetbzz
- 170
- 9