Run a shell script every day at a specific time

advertisements

This question already has an answer here:

  • How to write a cron that will run a script every day at midnight? 5 answers

I have a simple shell script that just checks the contents of a directory and if anything was added during the day makes a copy of it to a backup folder. I'd like to execute this script at the end of each day (let's assume at 23:55).

The system(Debian) which this scripts reside on it, is always on (kind of server)

How can I do that?


You want edit your crontab file using

crontab -e

Then you want to add

55 23 * * * COMMAND TO BE EXECUTED

for more info look at this