在命令不执行 [英] at command is not executed

查看:104
本文介绍了在命令不执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让 bash命令运行,但它不是为我工作。我可以将作业添加到队列中,但是当时间到了它不运行。我在做什么错了?

  hpek @ melda:〜$猫/usr/lib/cron/at.deny
hpek @ melda:〜$ ATQ
hpek @ melda:〜$现在所在的2分钟
回声TTTEEEST
工作在12日5月6日2时09分00秒2012
hpek @ melda:〜$日期
太阳5月6日2时10分24秒CEST 2012
hpek @ melda:〜$ ATQ
12日5月6日2点09分00秒2012
hpek @ melda:〜$


解决方案

看看的/ var / AT /职位,看看你的作业列出。 (这可能是基于操作系统不同的目录)。

在默认情况下,是不是在大多数系统上启用。为了让工作真正得到执行时,的获得atrun 命令必须执行。

此命令既可以通过的launchd 或通过的 cron的取决于系统。

的确切机制是因系统不同,所以你必须在,获得atrun 所有不同的联机帮助页C $ C>等,以验证是否您的系统上确实启用,您是否有权限在作业运行。通常有既是一个的蚂蚁允许的和的蚂蚁否认的系统上的文件,所以您需要同时检查。你必须是在允许的文件,也没有在拒绝的文件。

在最重要的是,你必须确保您的系统上,即使启用了(出于安全考虑,它通常是禁用)。

I am trying to make the at bash command to run, but it is not working for me. I can add a job to the queue, but it is not run when the time is up. What am I doing wrong?

hpek@melda:~$ cat /usr/lib/cron/at.deny 
hpek@melda:~$ atq
hpek@melda:~$ at now +2 minutes
echo TTTEEEST
job 12 at Sun May  6 02:09:00 2012
hpek@melda:~$ date
Sun May  6 02:10:24 CEST 2012
hpek@melda:~$ atq
12  Sun May  6 02:09:00 2012
hpek@melda:~$ 

解决方案

Take a look at /var/at/jobs and see if your at jobs are listed there. (It may be a different directory based upon OS).

By default, at isn't enabled on most systems. In order for at jobs to actually get executed, the atrun command must execute.

This command is executed either through launchd or through the cron depending upon the system.

The exact mechanisms are different from system to system, so you'll have to read all the various manpages on at, atrun, etc. to verify if at is really enabled on your system, and whether you have permissions to run at jobs. There's normally both an ant allow and an ant deny file on your system, so you need to check both. You must be both in the allowed file, and also not in the deny file.

On top of that, you have to make sure that at is even enabled on your system (due to security concerns, it is usually disabled).

这篇关于在命令不执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆