Incron doesn't do anything

1.1k Views Asked by At

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 incrond[2785]: (root) CMD (touch "/home/test/test.new")

but nothing is created in the directory

[root@Minions test]# ll
total 0
-rw-r--r--. 1 root root 0 13 mai   11:40 test

Do you have an idea what is wrong ?

2

There are 2 best solutions below

0
On

This is rather old but... maybe your incrond service isn't running.

# systemctl enable incrond.service
# systemctl start incrond.service
0
On

I just del quote like this :

/home/test IN_CLOSE_WRITE touch $@/$#.new