cant make crontab work.
Hello everybody.
I use an indexing program called recoll. I want to run recollindex (a command to force indexing update) at startup. From the command line I just have to type recollindex and it works perfectly I have added various lines in my crontab : Code:
@reboot /home/ioannis/bin/recollscript I just added the chromium-browser line just to make sure the problem was not in my commands Yet nothing is executed When giving Code:
~$ sudo grep CRON /var/log/syslog Code:
Oct 24 18:58:29 ioannis-desktop CRON[1186]: (ioannis) CMD (/home/ioannis/bin/recollscript) Any help would be greatly appreciable |
Please remove the /home/ioannis/bin/recollscript and /usr/bin/chromium-browser lines and see this advice?
|
What makes you think that recollindex does not run actually ? Do you get an error indication somewhere ?
|
The "this advice" link above is not relevant, this would only be an issue for the real time indexer daemon (recollindex -m). The batch mode does not care about an X server.
|
Quote:
|
Quote:
|
Ok, then I'd try to set up the recoll debug log and see if anything gets in there.
In ~/.recoll/recoll.conf: loglevel = 6 logfilename = /tmp/rcltrace Then reboot and see if anything gets in there (it's reset by every recoll command so you have to take a look before you do anything else with recoll). Don't forget to reset the log level to 3 after, otherwise the log can get quite big. If there is nothing in the log, I think that we can assume that recollindex does not start at all. Any special security feature activated on the system ? I tried to do the exact same thing that you do by the way, it works for me, on a vanilla ubuntu 12.04 system. |
Quote:
Code:
crontab -e Code:
:4:../utils/execmd.cpp:185:ExecCmd::startExec: (0|0) /usr/bin/ionice {-c} {3} {-p} {4142} So it appears it is not a cron problem but rather recoll fails to read the directory. Any idea? |
Quote:
Your removable volume is quite probably not yet mounted at this point of the machine startup. I'd try to write a small shell script with a loop to test the existence of the volume then start recollindex, and start this from cron... while test ! -d /media/SUNDISK/AAPHF; sleep 1;done /usr/bin/recollindex Cheers, jf |
Thanks
Quote:
My HD is SSD , may be it explains why my flashdrive is not mounted when crontab is read, SSD is really fast I ll mark the thread as solved The test script didnt work and for the shake of readers of these lines in the future, a do should be included and no blank space between ! and -d should exist Code:
while test !-d /media/SUNDISK/AAPHF; do sleep 1;done Code:
01 * * * * recollscript Cheers Ioannis |
Sorry about the missing do, will test before I post next time. But there is definitely a space between the ! and the -d. You can't try it on the command line though as bash will take the ! for a history reference. So here goes the tested script, which will take the target directory as a parameter:
Code:
#!/bin/sh |
Quote:
|
All times are GMT -5. The time now is 10:48 PM. |