开发者

Svn auto updater

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 a开发者_如何学运维uto 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


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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜