开发者

How to do this in cron?

I have no experience with cron or unix so I was wondering if anybody would be kind enough to show me how to write something like: execute this at 8:30EST March 24 2011, delete the text "I am going camping tomorrow" and put in place the text "I have gone camping". The text would be right between and . Cron would then upload the program at 8:30est as well.

You can fill in any det开发者_运维技巧ails I didn't include for the sake of example (like pretend my php file is located C:/User/Billy/Desktop/nice.php). Anybody with a heart of gold willing to help a newbie? :[


You can set the cron job with at, though you can't specify timezone AFAIK (so just give the time in the current time zone).

at 8:30am March 24 2011
sed -i bak 's/I am going camping tomorrow/I have gone camping/g' C:/User/Billy/Desktop/nice.php
<CTRL-d>

Afterwards, you can check with atq that the job is queued. You can and should try this in advance, of course. Note that sed -i bak makes changes to a file in-place and creates a backup with extension .bak.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜