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...
echo
command to go? The cron process does not run in a terminal (in particular it does not run in the terminal from which you invoked thecrontab
command). 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).