From: Chaos E. <cha...@gm...> - 2007-03-12 02:05:54
|
hi, Obviously , you didn't aware when your script didn't finish in one minute the cron would start another script doing the same job. As you have mentioned, 1 minute was not enough to sync tree. I think that is the core problem. So my suggestion is , when your script starts, aquire a lock, then do all the sync things, and release the lock before exit. Hope my suggestion can help. On 3/12/07, Ervin Heged=FCs <ai...@gm...> wrote: > Hello, > > > chaos@felucia:~$ ps afx|grep sleep > > 25170 ? Ss 0:00 | \_ sleep 300 > > 25246 ? Ss 0:00 | \_ sleep 300 > > 25324 ? Ss 0:00 | \_ sleep 300 > > 25403 ? Ss 0:00 | \_ sleep 300 > > 25486 ? Ss 0:00 \_ sleep 300 > > 25530 pts/5 S+ 0:00 | \_ grep sleep > > chaos@felucia:~$ crontab -l > > # m h dom mon dow command > > * * * * * sleep 300 > > > > have i missed something? > Nothing. Or rather yes. :) > > I didn't wrote, the run-time of script usually less than 1sec. > > Here is my output: > # ps axf | grep chkdir.py > 24859 pts/2 S+ 0:00 \_ grep chkdir.py > > > > Hmmm... I think there is _no_ other thread (or process), what wants t= o > > > write to database. > > > > Still dont get it? > no, I don't. > > > If the event only occures 1-5 time per-week, why you make your script > > run every minute? > Because event occurs randomly: sometime it occur monday morning, > sometime friday evening - sometime it occurs in workhours, sometime > out of workhours. > > This is not so simple.... > > > Thank you: > > a. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share y= our > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev > --=20 Best Regards Chaos Eternal |