tags:

views:

68

answers:

3

I am writing my code in my virtual machine and always committing the folder that contains published web site to the free svn server. There is also another remote machine which is test server. I would like to make auto update in the remote machine. Is there any program can make auto update in every 30 seconds?

SVN Programs and their links: http://sanirimbuyok.blogspot.com/2010/03/svn-kaynaklar.html

+1  A: 

If you just want to run "svn up" periodically, you can just use a scheduled task.

For example, in here's how to do it in Windows XP. Which OS are you using?

Also, if you're updating an asp.net website, you may want to reload your website (touch web.config or restart IIS) after updating your code, otherwise the changes may not take effect.

Edit:

To actually run the command, when you create your scheduled task, you should do something like:

cmd /c svn up <path>

That will execute the svn up command against the specified path.

Your other option, instead of running the command directly is to create a batch file that contains the commands you want to execute. This will give you a little bit of flexibility, should you want to do more than just run a single command.

Nader Shirazie
how can i write auto update script to the windows scheduled task?
uzay95
First, thank you for the link. I know how can i create schedule but i don't know which exe or script will run when time to work is came. So, would you please tell me more what should i add(script) or choose application to make it auto update. I think there must be some parameters to make update to the tortoise application.
uzay95
You need to have the command line version of subversion installed. It includes an executable called `svn.exe` Then, on the command line, you can call `svn up`. If your website is in a folder called `c:\website`, you would just run `svn up c:\website`. TortoiseSVN will _not_ be used for this.
Nader Shirazie
There is command line version of `svn` that works on Windows. Just make sure you use the same base version svn libraries as Tortoise (there may be difference in .svn format).
Michał Niklas
It will probably make your life easier to first create a batch file that contains the svn commands, then, when scheduling the task, select the batch file as the executable.
Nader Shirazie
A: 

Have you looked at cron? Make simple shell script and run it from cron. But cron minimal time unit is minute. While you want to update every 30 secs, then create simple program that in infinte loop:

  • runs svn up
  • sleeps 30 secs
Michał Niklas
But i am using windows! "Cron is a time-based job scheduler in Unix-like computer operating systems."
uzay95
While 30 secs is really small amount of time then I think program (even batch) with infite loop will be good.
Michał Niklas
A: 

One word: cron, which is the canonical job scheduler on Unix-like systems. To get started, look at the man pages for cron(8) and crontab(5).

Windows has a job scheduler as well, but I wouldn't be able to tell you anything useful about it.

Will