Ubuntu - Schedule A Script To Run

There are many occasions where we want to schedule a .sh script to run at set intervals. I use this primarily for running backups every day of various amazon EC2 servers so that they are backed up to S3 on a nightly basis.

crontab -e(if it is the first time running this, press 1 to use nano)0 0 * * * bash /home/ubuntu/scripts/myscriptfile.sh to  >/dev/null 2>&1

This means that the script file will run at midnight every night.

Previous
Previous

Upgrade from Ubuntu 16 to Ubuntu 18

Next
Next

MySQL Languages List