Crontab does not works
-
Hi,
I have this dummy cronjob.
[root@fw /home/user/watchdog_snort]# crontab -l | tail -1 */1 * * * * root /bin/bash /home/user/watchdog_snort/dummy.sh [root@fw /home/user/watchdog_snort]# cat /home/user/watchdog_snort/dummy.sh #!/bin/bash echo "prueba" > /home/user/watchdog_snort/watchdog_logs [root@fw /home/user/watchdog_snort]# wc -l watchdog_logs 0 watchdog_logs [root@fw /home/user/watchdog_snort]# env -i SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin HOME=/root LOGNAME=dru /home/user/watchdog_snort/dummy.sh [root@fw /home/user/watchdog_snort]# wc -l watchdog_logs 1 watchdog_logs
As you can see, the script works fine even with the cron env. However, dummy script does not works in a cron schedule.
Have you got any ideas about why It is happening?Thanks!
-
/bin/bash doesn't exist in pfSense, use /bin/sh.
What error do you see when it tries to run?
Steve