Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

Beginners • What am I missing- Cron

$
0
0
Been looking at this for too long and I can't find the error, Help needed
Rasp pi 4 , 4 GRAM

My crontab looks like this:
*/5 * * * * /home/dave/test.sh &>> /home/dave/testOut.txt

test.sh is:
#!/usr/bin/bash
# a comment
echo 'Hello from test.sh'
date '+%A %W %Y %X'

test.sh is execute by anyone and testOut.txt change content anyone
the scripts run from the command line OK
Though ran ran as a cron job the file (testOut.txt) is empty

cron log file:
May 01 13:10:01 raspPi4-SSD CRON[68410]: pam_unix(cron:session): session closed for user dave
May 01 13:15:01 raspPi4-SSD CRON[68484]: pam_unix(cron:session): session opened for user dave(uid=1000) by (uid=0)
May 01 13:15:01 raspPi4-SSD CRON[68485]: (dave) CMD (/home/dave/test.sh &>>/home/dave/testOut.txt)
May 01 13:15:01 raspPi4-SSD CRON[68484]: pam_unix(cron:session): session closed for user dave
May 01 13:17:01 raspPi4-SSD CRON[68545]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)


What am I missing and/or not seeing?

Thanks

Statistics: Posted by HopHead — Thu May 01, 2025 8:32 pm



Viewing all articles
Browse latest Browse all 8041

Trending Articles