LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1309|回复: 2

也许有人不知道这个 dcron

[复制链接]
发表于 2007-8-13 09:44:53 | 显示全部楼层 |阅读模式
什么是经典?我认为这个就是!向作者致敬!

其简洁程度正是我们所追求的,我一直用的都是这个,虽然是94年的东东...
总共只有两个文件:
  1. root@domain:~# ls /mnt/lfs/usr/bin/cron* -l
  2. -rwxr-x---  1 root root 14888 Jan  1 08:00 /mnt/lfs/usr/bin/crond
  3. -rwxr-x---  1 root root 10020 Jan  1 08:00 /mnt/lfs/usr/bin/crontab
  4. root@domain:~#
复制代码

看看 README 吧
  1. CREDITS
  2.     I finally got tired of all of these wild cron programs that take the
  3.     task of running timed jobs to ridiculous extremes in terms of
  4.     capabilities and unnecessary features.  So here is my entry:  a
  5.     crond/crontab combination that is simple and elegant, and hopefully
  6.     secure to boot.  This cron implements reasonable features in terms
  7.     of field specification in the crontab and allows individual user
  8.     crontabs.  
  9.     This program is written entirely from scratch by yours Truely (sig
  10.     at bottom).
  11.     All jobs are run with /bin/sh for conformity and portability, thereby
  12.     avoiding the mess that occurs with other cron's that try to use the
  13.     user's perfered shell, which breaks down for special users and even makes
  14.     some of us normal users unhappy (for example, /bin/csh does not use a true
  15.     O_APPEND mode and has difficulty redirecting stdout and stderr both to
  16.     different places!).  You can, of course, run shell scripts in whatever
  17.     language you like by making them executable with #!/bin/csh or whatever
  18.     as the first line.  If you don't like the extra processes, just 'exec'
  19.     them.
  20.     Under the same reasoning, this cron does not allow you to specify
  21.     environment variables or other stuff better left specified as
  22.     arguments to a shell script.  Talk about nonsense!
  23.     The programs were written with an eye towards security, hopefully I
  24.     haven't forgotton anything.  The programs were also written with an
  25.     eye towards nice, clean, algorithmically sound code.  It's small, and
  26.     the only fancy code is that which deals with child processes.  I do
  27.     not try to optimize with vfork() since it causes headaches and is
  28.     rather pointless considering I'm execing a shell most of the time,
  29.     and I pay close attention to leaving descriptors open in the crond
  30.     and close attention to preventing crond from running away.
复制代码

请去掉附件 txt 扩展名。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2007-8-14 16:11:37 | 显示全部楼层
是的,我也不知道。。。:p
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-15 09:18:31 | 显示全部楼层
it is sexy
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表