寻觅生命中的那一片浅草......

文章带标签 Cygwin

windows下启动cygwin的cron

windows下启动cygwin的cron
windows 的计划任务管理 taskschedule 实在太不合我口味了,老早以前就搜过 windows 下的 cron 实现,找到一个运行不怎么稳定,莫名其妙的崩溃。老早以前用 cygwin 的时候,以 linux 的思维方式, crontab -e 制定完任务以后,发现怎么也执行不了。

前阵子又进一步了解了 cygwin ,原来还需要启动一个服务才能够搞定 cron 。cygwin 下不仅仅是 cron 需要以 windows 服务的方式启动,消息队列、共享内存以及信号量等进程间通信方式也需要以 windows 服务方式启动 cygserver 以后才可用。除了 cron 包,还需要确认 cygrnsrv 包已经安装:

# 安装 cron 服务
cygrunsrv -I cron -p /usr/sbin/cron -a -D
# 启动服务: 也可以用 windows 的启动方式 net start cron
cygrunsrv -S cron

# 启动 cygserver
cygrunsrv -I cygserver -p /usr/sbin/cygserver -e “CYGWIN=server”

启动 cron 以后,即使关闭 cygwin 命令窗口,crond 还是会继续运行 :) ,而且默认是自动启动的服务,重启机器以后依然运行—不需要开 cygwin 窗口。

如果用于运行cron的用户是有密码的

则需要用

cron-config来进行初始化配置

cygwin install catalog

cygwin setup.exe 2.573.2.2

Accessibility
Admin
shutdown: Shutdown, reboot, hibernate or suspend the machine
Base
alternatives: A tool for managing package conflicts
ash: A Bourne Shell (/bin/sh) workalike
bash: The GNU Bourne Again SHell
coreutils: GNU core utilities
cygwin: The UNIX emulation engine   1.5.24-2
cygwin-doc: Utilities for finding files–fine, xargs, locate, updatedb
gawk: GNU awk, a pattern scanning and processing language
grep: Search and print textual input for lines which match a specified pattern
gzip: The GNU compression utility
login:  Sign on to a system
man : Man, apropos and wahtis
run: Start console programs with hidden console
sed: The GNU sed stream editor
tar: A GNU file archiving program
which: Displasy where a particular program in your path is located

阅读全文»

XP下通过cygwin架设SSH服务

综合两篇文章,成下文:

第一篇:http://hi.baidu.com/qiraosky/blog/item/35a7f144d9f3488ab3b7dc2e.html

sshd服务是一种安全连接,它能让你访问服务器上的命令行界面。Windows本身没有提供该服务,所以我们可以通过 cygwin 来进行安装。
安装 cygwin

首先安装 cygwin。安装时间为 2006-10-8,Cygwin DLL版本为 1.5.21-1。除了默认的软件包之外,又增加了以下软件包。

* Admin
o cron-3.0.1-19
o cygrunsrv-1.17-1
o shutdown-1.7-1
o syslog-ng-1.6.11-1
* Archive
o unzip-5.50-5
o zip-2.3-6
* Devel
o subversion-1.3.2-1
* Editors:
o vim-7.0.076-1
* Interpreters
o gawk-3.1.5-4
o perl-5.8.7-5
o expat-1.95.8-1
* Libs
* Net
o lftp-3.5.1-1
o openssh-4.4p1-1
o openssl-0.98d-1
o openssl097-0.9.7l-1
o ping-1.0-1
o netcat-1.10-2
* Shells
o ash-20040127-3
o bsah-3.1-9
o bash-completion-20060301-1
o mc-4.6.1-2
* Utils
o patch-2.5.8-8
o time-1.7-1
* Web
o wget-1.10.2-1
阅读全文»

2024年三月
« 5月    
 123
45678910
11121314151617
18192021222324
25262728293031