I typed the following into crontab -e0 0 * * * bitcoind -datadir=/home/pi/bitcoinData -daemon0 6 * * * bitcoin-cli -datadir=/home/pi/bitcoinData stopI expect this to run bitcoind -datadir=/home/pi/bitcoinData -daemon at 12am every dayand then run bitcoin-cli -datadir=/home/pi/bitcoinData stop at 6am every day.But the commands do not get executed.How can I fix this?Output from cron status:pi@raspberrypi:~ $ sudo service cron status cron.service - Regular background program processing daemon   Loaded: loaded (/lib/systemd/system/cron.service; enabled)   Active: active (running) since Tue 2016-05-03 20:57:33 BST; 58min ago     Docs: man:cron(8) Main PID: 5932 (cron)   CGroup: /system.slice/cron.service           5932 /usr/sbin/cron -fraspberrypi CRON[7608]: pam_unix(cron:session): session opened for user root by (uid=0)raspberrypi CRON[7615]: (root) CMD (bitcoind -datadir=/home/pi/bitcoinData -daemon)raspberrypi CRON[7608]: pam_unix(cron:session): session closed for user rootraspberrypi cron[5932]: (root) RELOAD (crontabs/root)pi@raspberrypi:~ $ (As suggested)I added >> /tmp/bitcoin-cron.log 2>&1 to the end of each line in cron.The log file was showing /bin/sh: 1: bitcoind: not foundSo I added the full paths to the programs into the PATH like this:pi@raspberrypi:~/bin $ locate bitcoind/usr/local/bin/bitcoindpi@raspberrypi:~/bin $ locate bitcoin-cli/usr/local/bin/bitcoin-clipi@raspberrypi:~/bin $ export PATH=$PATH:/usr/local/bin/bitcoindpi@raspberrypi:~/bin $ export PATH=$PATH:/usr/local/bin/bitcoin-clipi@raspberrypi:~/bin $ echo $PATH/home/pi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/usr/local/bin/bitcoind:/usr/local/bin/bitcoin-cliTried cron again, and it generated a second line in the log file, which also said /bin/sh: 1: bitcoind: not found
Two cronjobs not working (one to start a process, one to stop a process)
debian;ubuntu;cron;raspbian
Solution to the problem is to modify the entries in cron with the absolute path names. Added cron command logging capability as the machine doesn't have an MTA to send failure notifications, as follows:0 0 * * * /usr/local/bin/bitcoind -datadir=/home/pi/bitcoinData -daemon >> ~/bitcoinData/bitcoin-cron.log 2>&10 6 * * * /usr/local/bin/bitcoin-cli -datadir=/home/pi/bitcoinData stop >> ~/bitcoinData/bitcoin-cron.log 2>&1