I set up a cron job in a instance on Google Cloud's compute engine.
It is suppose to run at 7:47am every day. However each time I check if the file has been executed at 7:48 it does not work.
The code for the helloworld.sh file is here
echo "helloworld" + "$(date)" > helloworld.txt
I have set checked as root and set up the cron job as root still nothing. Any ideas?
The cron job is wrong because you need to use absolute paths in your command. Try:
/bin/bash /home/username/helloworld.sh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With