r/bashscripts • u/killingerr • Nov 22 '19
Help with Cron
So I have a very simple script that I would like to run.
#!/bin/bash
sudo apt update -y
sudo apt full-upgrade -y
reboot echo "Update successful : $(date)" >> /tmp/update/log
I am trying to run this with cron, which looks like this
* * * * * bash /home/me/Documents/Scripts/update.sh
I cannot get this to run and am not quite sure where I am going wrong. Any assistance would be appreciated.
1
Upvotes
View all comments
Show parent comment
1
u/killingerr Dec 08 '19
The timing was just to test. Also I decided to use systemd instead.