免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6249 | 回复: 6
打印 上一主题 下一主题

[SCO UNIX] 怎么查看和设置crontab? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-07-10 08:28 |只看该作者 |倒序浏览
查到/bin/crontab,/ibin/crontab但都是乱码,这个文件应该怎么查看和设置?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2003-07-10 08:30 |只看该作者

怎么查看和设置crontab?

置顶精华分类中,有多篇关于crontab 的帖子

论坛徽章:
0
3 [报告]
发表于 2003-07-10 09:29 |只看该作者

怎么查看和设置crontab?

crontab -l 查看
crontab -e编辑

论坛徽章:
11
数据库技术版块每日发帖之星
日期:2016-06-25 06:20:00数据库技术版块每日发帖之星
日期:2016-06-24 06:20:00数据库技术版块每日发帖之星
日期:2016-05-03 06:20:00数据库技术版块每日发帖之星
日期:2016-04-21 06:20:00数据库技术版块每日发帖之星
日期:2016-01-23 06:20:00数据库技术版块每日发帖之星
日期:2015-12-03 06:20:00综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-19 06:20:00数据库技术版块每日发帖之星
日期:2015-08-20 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:15数据库技术版块每日发帖之星
日期:2016-07-30 06:20:00
4 [报告]
发表于 2003-07-10 09:33 |只看该作者

怎么查看和设置crontab?

crontab(C)
  **********

  ____________________________________________________________________________
  crontab -- schedule commands to be executed at regular intervals

  Syntax
  ======

  crontab [ file ]

  crontab [ -e | -l | -r ]

  crontab -u user [ -e | -l | -r ]

  Description
  ===========

  The crontab command can be used to schedule commands to be executed at
  regular intervals. These commands are stored in the user's crontab file,
  /usr/spool/cron/crontabs/username. Any output or errors generated by the
  commands are mailed to the user.
If called with no options, crontab copies the specified file, or standard
  input if no file is specified, into the crontabs directory. If the user has
  a previous crontab file, this is replaced.

  crontab understands the following options:

  -e      Permit the contents of the user's crontab file to be edited with the
          editor specified by the EDITOR environment variable. The default
          editor is vi(C). A copy of the crontab file is edited and checked
          for validity before it replaces the installed crontab file.

  -l      List the contents of the user's crontab file.

  -r      Remove the user's crontab file from the crontabs directory.

  -u      Allow crontab to manipulate a different crontab file from invoking
          users. If crontab is used from an su(C) session then crontab by
          default will manipulate the crontab file of the su'ed user. The -u
          option may be used to direct crontab to manipulate the original
          login user's crontab file instead. root can also use the -u option
          to manipulate any user's crontab file.

If the file /usr/lib/cron/cron.allow exists, only the users listed in that
  file are allowed to use crontab. If cron.allow does not exist, and the file
  /usr/lib/cron/cron.deny does, then all users not listed in cron.deny are
  allowed access to crontab. An empty cron.deny allows global usage. If
  neither file exists, only root is allowed to submit a job. The allow/deny
  files consist of one user name per line.

  The crontabs files consist of lines of six fields each. The fields are
  separated by spaces or tabs. The first five are integer patterns that
  specify the minute (0-59), hour (0-23), day of the month (1-31), month of
  the year (1-12), and day of the week (0-6, with 0=Sunday). Each of these
  patterns may contain:

   o a number in the (respective) range indicated above

   o two numbers separated by a minus (indicating an inclusive range)

   o a list of numbers separated by commas (meaning all of these numbers)

   o an asterisk (meaning all legal values)

  Note that the specification of days may be made by two fields (day of the

论坛徽章:
0
5 [报告]
发表于 2003-07-10 20:38 |只看该作者

怎么查看和设置crontab?

那看的那些是执行码。

论坛徽章:
0
6 [报告]
发表于 2009-11-24 09:54 |只看该作者
crontab: usage error: unrecognized option
usage:  crontab [-u user] file
        crontab [-u user] [ -e | -l | -r ]
                (default operation is replace, per 1003.2)
        -e      (edit user's crontab)
        -l      (list user's crontab)
        -r      (delete user's crontab)
        -i      (prompt before deleting user's crontab)
        -s      (selinux context)

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
7 [报告]
发表于 2009-11-24 11:29 |只看该作者
crontab -e
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP