Schedule script in Ubuntu

If you would like to run the script as Admin/Sudo, then:

sudo crontab -e

and paste the following at the bottom of the file:

59 23 * * * sh ~/Desktop/

That will run at 23:59 everyday. The format for cron is:

minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday (0-6, 0 = Sunday), and a star(*) for all the time.

To run a script without root privileges:

crontab -e

and repeat as above.