Questions tagged [incron]

It stands for "inotify cron" system. Similar to the regular cron. The difference is that it handles filesystem events rather than time periods.

50 questions
0
votes
0 answers

Incron-Job started Script but only the first command

My goal is to get a/all list/s out of the mycroft skill "List-Manager" in formated and splitted txt-files to transfer them to my Nextcloud-Notes-Skill. Sure, Hey Google and Alexa are the easiest options but I don't like them. The bash-script I wrote…
subduck
  • 1
  • 2
0
votes
2 answers

incron - table for invalid user - after reboot - ubuntu 18.04

I use incron to check what happen on several folder outside of user's home, like: /folder/tmp/pdf-writer-work/AD_User_Login IN_MOVED_TO pdf-firefox "$#" /folder/tmp/pdf-writer-alert/AD_User_Login IN_CREATE pdf-writer-alert "$#" My user is allow in…
Totorux
  • 3
  • 1
0
votes
1 answer

Watching folder with incron seems to kill my server

I would like to run a php script on a folder whenever content in that folder changes (a file is edited, or overwritten, or added or deleted). The php script gets a hash code for each file in the folder, and writes all the lines in a hash.txt file…
msoutopico
  • 357
  • 3
  • 15
0
votes
1 answer

Using incrontab mv file results in 0 byte file

I'm watching a folder using incrontab with the command in the incrontab -e editor: /media/pi/VDRIVE IN_CLOSE_WRITE sudo mv $@/$# /media/pi/VDRIVE/ready/$# The watched folder is relieving a file over the network from another machine—the file shows up…
Nowski
  • 173
  • 1
  • 14
0
votes
1 answer

Q: incrond - where does SDTOUT and STDERR go?

Coming from cron I do know that stdout/stderr is mailed to the user executing the script. But incron doesn't seem to have the same functionality. So where do stdout/stderr go to?
Ralf Hildebrandt
  • 543
  • 2
  • 16
0
votes
0 answers

incron on Ubuntu - bash script called by incrontab - dollar parentheses $(command) command substitutions fail

I have a bash script that runs fine from the command line, but when it's called from incrontab the substitutions fail. The script runs, but the commands in $(...) fail :( My incrontab -e : /home/kelly/summer IN_CREATE /bin/bash…
0
votes
0 answers

Moving the Usable File in Linux

In Centos 7 I am tracking a folder on the Samba Server with incrontab. I want to copy this folder to another folder when it is created. Before writing to the Samba server I first define the file path, the software copies it directly to the incrontab…
public_html
  • 309
  • 1
  • 4
  • 10
0
votes
2 answers

Incrontab output to file not working

I've got an incrontab rule set up to react to a file being added to a particular directory on my ubuntu box, and run a script. This works fine, but my goal is to print the output of that script to a file. I've tried a few different ways to go about…
adam3039
  • 1,171
  • 14
  • 27
0
votes
1 answer

python readlines not working during incron

I'm trying to call a python script through incron: /data/alucard-ops/drop IN_CLOSE_WRITE /data/alucard-ops/util/test.py $@/$# but I cant seem to read from the file passed. Here is the script: #!/usr/bin/env /usr/bin/python3 import os,sys logfile =…
deadpickle
  • 115
  • 2
  • 15
0
votes
1 answer

Precisions about incron event

I'm currently learning a little bit the incron. To learn I have a working incron on a VM, watching when a file is moved into a watched folder. Here is the incron : /var/share/entrant/DEFAULT/ IN_CLOSE,IN_CLOSE_WRITE,IN_CLOSE_NOWRITE…
Nathan30
  • 689
  • 2
  • 8
  • 29
0
votes
0 answers

python can't find libraries if run from incron

I have a python script that processes excel files. I this script is run via python from the command line, it runs as expected but when I run from incron, it does't appear to see my imports, such as pandas this is how I call from…
chip
  • 3,039
  • 5
  • 35
  • 59
0
votes
1 answer

abrt-server: Undefined variable outside of [[ ]] bracket

I am trying to run my python scripts from incron triggers, but I'm having this error abrt-server: Undefined variable outside of [[ ]] bracket Now I'm not sure if this is with my python script because if I run it independently, it does work as…
chip
  • 3,039
  • 5
  • 35
  • 59
0
votes
1 answer

Problems running bash script from incron

I have a simple incron task setup to run a command whenever a particular .json file is written-to, then closed. /var/www/html/api/private/resources/myfile.json IN_CLOSE_WRITE,IN NO LOOP /var/www/html/api/private/resources/run_service.sh I can see…
locksem
  • 315
  • 3
  • 16
0
votes
2 answers

cp in a script doesnt work with incron?

I created a backup-script for /var/www and /usr/lib/cgi-bin. Every time when a file gets edited or added the script should be called via incron. root@corkea:~# incrontab -l /usr/lib/cgi-bin IN_ATTRIB,IN_CREATE,IN_DELETE,IN_CLOSE_WRITE,IN_NO_LOOP…
Mario
  • 679
  • 6
  • 10
0
votes
1 answer

Call a REST API using incron and bash script?

I'm using incron to check if XML files are uploaded in a folder Depot using : /home/parallels/Desktop/Depot IN_CLOSE_WRITE /home/parallels/Desktop/Depot/add.sh $# When a new file is detected, the following bash script add.sh (which is in the Depot…
Whatever
  • 301
  • 2
  • 6
  • 15