How to auto run sh every day?

Use cron. Open your user’s crontab:

bash<br>crontab -e<br>

Add a line with the desired schedule and the script’s full path, e.g. to run it every day at 02:00 AM:

cron<br>0 2 * * * /home/ubuntu/.../xxx.sh<br>

Save and exit; cron will execute the .sh file automatically each day at the specified time.

Sign In Name Sign Out