0

I have a strange thing (i think), I added a line in my crontab on an QNAP NAS with crontab -e i saved (:wq!)

This line would have had a script to run for every 5 minutes so i dit 5 * * * * and the script name. And restarted the crontab.

This script fills a database. Last night i quit trying, went to bed and kept de NAS running. And wen ik woke up this morning i looked at the database and the script is running.

However it runs every hour, so i tought i take a look at the crontab, with crontab -l But i cant find the line with the script name in it ?

Can somebody explain this to me ?

May be the crontab is overwritten, but not restarted ??? (may be)(dont know).

4 Answers 4

0

editing crontab directly should work until QNAP reboots. You will loose your amendments. this explains why you can't find your job (pending QNAP rebooted. There seems to be some questions behind QNAP's cron anyway). you'll need to use autorun.sh which will allow you to load your specific configs on startup.

more reading on QNAP cron more reading on autorun.sh

1
  • actually, i should say that you could loose your amendments. again, QNAP cron doesn't seem very stable to me (IMHO).
    – au_stan
    Aug 16, 2012 at 13:06
0

Check /var/log/messages to see what is going on. Specifically, Check whether crond service is restarted after you lastest config (last night) or not.

1
  • This file is empy. So i have to find a way to start the logging.
    – Plumbum7
    Aug 16, 2012 at 9:34
0

Also check /var/log/cron and /var/spool/cron/ for more information about running tasks.

0

You should check /var/spool/cron/ for active cron jobs. It is running every hour because you specified 5 * * * * not */5 * * * *.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .