LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cron Job???? (https://www.linuxquestions.org/questions/linux-newbie-8/cron-job-638357/)

ajeetraina 04-28-2008 05:36 AM

Cron Job????
 
I have a script called svn-fullbackup.sh placed at /etc/cron.daily directory.I want it to run everyday at 11:30p.m.What changed I need to make in crontab file or else other so that I can enable the backup process everyday.It seems that placing the file under cron.daily is not taking the backup.

Pls Help

jakev383 04-28-2008 06:14 AM

Quote:

Originally Posted by ajeetraina (Post 3135364)
I have a script called svn-fullbackup.sh placed at /etc/cron.daily directory.I want it to run everyday at 11:30p.m.What changed I need to make in crontab file or else other so that I can enable the backup process everyday.It seems that placing the file under cron.daily is not taking the backup.

Pls Help

First, make sure the script is executable:
Code:

chmod +x svn-fullbackup.sh
Then place it somewhere (I use /usr/local/sbin for things like that).
Remove the copy in /etc/cron.daily (that will run at 4:30am I think).
Edit your cron jobs:
crontab -e
This will make it run at 11:30pm:
Code:

30 23 * * * svn-fullbackup.sh
Save and exit (most likely you're using vi, so you may want to grab a quick reference for it's commands).
That should get you running!

ajeetraina 04-28-2008 06:15 AM

How can I see if the cron job is set or list of crond jobs in my machine

jakev383 04-29-2008 09:20 AM

Quote:

Originally Posted by ajeetraina (Post 3135396)
How can I see if the cron job is set or list of crond jobs in my machine

Cron jobs (scripts, programs, etc.) located in /etc/cron.hourly will be run every hour. Cron jobs in /etc/cron.daily will be run daily, etc.
There are also cron jobs set for the users, which you can see by issuing:
Code:

crontab -l


All times are GMT -5. The time now is 11:06 AM.