Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Is there a way to have Linux run a command every X minutes?

I want to run a command which will be synchronize my remote folder data to my local computer. command is sync -ave 'ssh -p 22' /home/home/Test_anuragvijaya

this is the command which I want to run everyday on a particular time. is it possible that I will schedule this command. so it will automatically run on a particular time. like i want to run this command daily at 10 am morning.

please suggest me how to write the program for this job.

share|improve this question

marked as duplicate by slhck Jan 24 '13 at 20:23

This question was marked as an exact duplicate of an existing question.

You make it a cronjob, as you said in your title (and the tags). I'm missing the question here. Did you experience any problems while setting up your cronjob? – slhck Jan 24 '13 at 20:13
I know it can be possible with cronjob but i am not familiar with linux. so if you write how to do it. it is easy for me to compete. – Anonymous Anurag Jan 24 '13 at 20:20
Sorry, but there are so many resources out there on how to create cronjobs… We do require questions to show some effort into solving a problem yourself. Please read How to Ask for more info. Have you thoroughly searched for an answer before posting? – slhck Jan 24 '13 at 20:22
thanks. I will search for it. – Anonymous Anurag Jan 24 '13 at 20:32
Well, I had written up a really nice answer with steps and all. But then it got closed. me.likeSuperUser--; – Doc Jan 24 '13 at 20:42

I recommend first putting that command into a bash script. Then, add this to your crontab:

0 10 * * * /path/to/script
share|improve this answer
thanks. actually i am not much familiar with linux. can you explain how to write a bash script. – Anonymous Anurag Jan 24 '13 at 20:18
You don't need to put the command in a script—you can run it straight from the crontab. @AnonymousAnurag, this is something you might want to look up in a tutorial or two. This is a very basic thing you should be able to find out quite easily when you search online. – slhck Jan 24 '13 at 20:21
The easiest way would be to just put your command in a file and save it somewhere. Then you could just put that whole line as something like: 0 10 * * * /usr/bin/bash /path/to/your/script @slhck: I generally like them in scripts to help keep my crontab cleaner, but it's up to him. – Nate Jan 24 '13 at 20:23
thank you so much. – Anonymous Anurag Jan 24 '13 at 20:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.