Cronjob every 30secs
Rashkae
ubuntu at tigershaunt.com
Tue May 12 18:50:58 UTC 2009
Tence T. George wrote:
> Hey guys,
>
> I wrote a python script using pysvn that checks my svn server and
> updates/exports directorys on my ubuntu webserver. But, now I need it to run
> every 30secs so that developers working on the same project don't need to
> wait so long to see changes done to the developmental side of the website.
> I don't really care for how many cpu cycles it uses up since the machine is
> multicore comp. I did some googling and most sites say that crons can't do
> less than a minute. I was just wondering if anyone had a workaround for it.
>
> From,
> Tence T. George
>
>
Use a shell script with an infinite loop and a 30 second sleep (or 25
second sleep, assuming the process takes 5 seconds to complete.)
#!/bin/bash
while [ 1 ]
do
# Your code goes here
# Modify sleep time (in seconds) as needed below
sleep 2
done
More information about the ubuntu-users
mailing list