我的定时脚本

高亮版本看[这里 ](http://not- sobad.appspot.com/show_code/?key=aglub3Qtc29iYWRyCwsSBENvZGUY8WAM)。 作用就是 11,15,18,20,23等几个时间点执行我的脚本。 #!/bin/sh #cron.sh #浪点空间不支持crontab #blog数据同步脚本需要每隔几个小时执行一次,所以自己写了一个简单的 #usage: #nohup cron.sh &>/dev/null & get_local_hour(){ if ! date|grep UTC >/dev/null;then date +%H return 0 fi d=$(expr `date +%H` + 8) if [ $d -gt 24 ];then d=$(expr $d - 24) fi echo $d } cd $HOME/script || exit 1 while [ 1 ];do if ( (echo 11,15,18,20,23 | grep `get_local_hour` >/dev/null ) );then [ -s .rpc_end_link -a -f wp.py ] || exit 2 python wp.py 2>&1 >wp.log fi sleep 3600 done exit 0 后记:白忙了,还不如这样搞。 ...

April 30, 2009 · notsobad

Notsobad.cn is coming back

notsobad.cn,又回来了,希望这次可以做好 买的是浪点带shell的linux空间 接下来要做的事: 将code snipper从gae移到这里来 经常的更新blog 用django作一些小工具 wordpress的自动更新脚本: #!/bin/sh # update my blog from svn, and get the language pack blog=notsobad.cn/public_html/blog/ (cd $blog; svn up) ( cd $blog/wp-includes/languages/; rm zh_CN.*; wget http://svn.automattic.com/wordpress-i18n/zh_CN/tags/2.7/messages/zh_CN.mo; wget http://svn.automattic.com/wordpress-i18n/zh_CN/tags/2.7/messages/zh_CN.po; )

April 27, 2009 · notsobad

Thank you

Thank You My tea's gone cold, I'm wondering why I got out of bed at all the morning rain clouds up my window and I can't see at all And even if I could it'd all be grey, but your picture on my wall it reminds me that it's not so bad it's not so bad I drank too much last night, got bills to pay my head just feels in pain I missed the bus and there'll be hell today I'm late for work again and even if I'm there, they'll all imply that I might not last the day and then you call me and it's not so bad it's not so bad and I want to thank you for giving me the best day of my life Oh just to be with you is having the best day of my life Push the door, I'm home at last and I'm soaking through and through then you handed me a towel and all I see is you and even if my house falls down now, I wouldn't have a clue because you're near me and I want to thank you for giving me the best day of my life Oh just to be with you is having the best day of my life I want to thank you for giving me the best day of my life Oh just to be with you is having the best day of my life

April 27, 2009 · notsobad

Posts Archive

notsobad