I'm trying to make crontab run a sh script every 5 minutes.
This is my root (sudo crontab -e) crontab setup:
*/5 * * * * /etc/test.sh
and this is the script:
#!/bin/bash
echo "time:$(date)"
EDIT: i've made it work by using the user crontab file (crontab -e) but I still need to run my script with administrative privileges...
echocommand to go? The cron process does not run in a terminal (in particular it does not run in the terminal from which you invoked thecrontabcommand). If you look in /var/log/syslog you will probably find a log entry confirming that the job did in fact run (provided the script is executable). – steeldriver Jan 08 '14 at 22:13