1

i want to execute bash file daily at 12:30 for example to make backup to something how i can do it ?? and other one monthly ???? the operating system is Unix

Mohammad AL-Rawabdeh
  • 1,612
  • 12
  • 33
  • 54

2 Answers2

4

You're looking for cron.

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
4

You will have to use the cron facility to do this. In particular you will have to edit the crontab file and add a couple of entries.

To run a job daily at 12:30 you would create an entry in the crontab file like so

30 12 * * * /path/to/your/DailyBashScript

to run a job monthly for example on the 1st of the month at 20:45

45 20 1 * * /path/to/yourMonthlyBashScript
user9517
  • 115,471
  • 20
  • 215
  • 297