Questions tagged [incrontab]

incrontab is a command from the incron project (inotify cron, for cron based on inotify events) used to manage the crontab for incron

Part of , the incrontab command is used to manage the crontab entries for incron. Unlike time-driven , incrond uses events to trigger execution.

25 questions
18
votes
5 answers

rsync error unexplained error (code 255) at io.c

I was using a script to perform rsync in sudo crontab. The script does a 2-way rsync (from serverA to serverB and reverse). After I reboot both the server machines, the rsync is not working in sudo crontab. I also setup a new cronjob and it fails,…
kabeer
  • 181
  • 1
  • 1
  • 3
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…
David R.
  • 607
  • 3
  • 6
  • 18
4
votes
1 answer

How can I create cron jobs in specific files on Linux Centos

I want to have a separate folders for cron jobs like: /mydata/cronjobs Now in that folder I want to have files like backup_server which will have the content like: 30 3 * * 1-5 /home/user/scripts/backup.sh 30 3 * * 1-5 /home/user/scripts/backup2.sh…
MOtaro Site
  • 193
  • 2
  • 3
  • 13
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…
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.…
2
votes
1 answer

incrond Error - access denied on /home/*/abc/ events will be discarded silently

I am getting following error on Ubuntu in the logs. incrond Error - access denied on /home/*/abc/ events will be discarded silently I am trying to monitor /home/*/abc/ can be anything. Any ideas how to fix?
serverliving.com
  • 875
  • 6
  • 15
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…
2
votes
1 answer

ways to automatically fix line endings in shell scripts or files who break with ^M

Problem We regularly break our files lines endings and things stop working without us noticing. Bash complains about "invalid option" or ": command not found" as described here:…
pyb
  • 216
  • 2
  • 7
2
votes
2 answers

Using puppet to manage incrontab

Puppet has the cron resource for managing the crontab, but is there a similar way of managing incrontab? I can find no writings anywhere regarding this, and to be fair, I'm extremely new to puppet (software dev helping out an overworked sysadmin).
Josh Smeaton
  • 1,330
  • 2
  • 19
  • 31
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…
KinGBin
  • 21
  • 3
1
vote
1 answer

Cronjob starts multiple processes

Cronjob creates multiple processes for the same script. One using /usr/bin/php /path/to/php/script And other using /bin/sh -c /usr/bin/php /path/to/php/script These are 2 separate processes. Why does this happen? I am running Ubuntu 14.10…
1
vote
1 answer

incrontab is not recognizing www-data writes

I have a Linux server with incrontab. Here is my incrontab /home/pi/upload IN_MODIFY /bin/sh /home/pi/autoprint $@/$# If I am a root user, i tried creating a new pdf file inside the 'upload' folder, and the incrontab event is triggered,, however, if…
WantIt
  • 217
  • 2
  • 9
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…
1
vote
3 answers

Cron - Does not execute command every 10 mins

I don't understand why cron is not really executing the command every 10 minutes. in crontab -e I have added: */10 * * * * /var/www/myproject/recording/batch.pl I could see in the cron log it is running every 10 mins: Mar 17 10:50:01 host…
I'll-Be-Back
  • 693
  • 3
  • 9
  • 24
1
vote
1 answer

use incrontab to run a cron job when anything under a directory is modified using *

how can I tell incrontab to run this command when there has been any modification done under the /web directory? /web IN_CREATE,IN_DELETE,IN_MODIFY /bin/echo "this is a test..."
Eli
  • 417
  • 2
  • 7
  • 18
1
2