English 中文(简体)
创建一个命名的Cron作业
原标题:Creating a Named Cron Job
  • 时间:2010-02-23 03:26:29
  •  标签:
  • cron

您如何从命令行创建cron任务,以便在gnome-schedule中显示名称?

我知道如何使用crontab创建定时任务。然而,所有我的任务都没有名称。我想更好地记录我的任务,以便我可以在gnome-schedule中轻松地识别它们或类似的cron包装器。

最佳回答

好的,刚刚在计划程序中创建了一个cronjob,并查看了我的crontab文件,它的样子是这样的:

0 0 * * * ls >/dev/null 2>&1 # JOB_ID_1

请注意结尾处的 JOB_ID_1

我进入了<条码>~/gnome/gnome-scheduler/,查看了其中的文档,有一个名字是<条码>。 (如“一”号) 具有胚胎范围,包括姓名

ver=3
title=Hello
desc=
nooutput=1

因此,我创建了第二个cronjob:

0 0 * * * ls -al >/dev/null 2>&1 # JOB_ID_2

将文件1复制到2以匹配JOB_ID_2,修改了描述,使文件变为:

ver=3
title=This is a test
desc=
nooutput=1

然后我切换到Gnome-Schedule,它已经添加了cron作业,并已更新名称。

按照相同的步骤操作,您应该能够手动命名任何cron工作。

问题回答

暂无回答




相关问题
Cron on XAMPP (Mac OS)

I have installed XAMPP server on my Mac OS, how to setup a cron job on it? My requirement is that i want to call a php script at regular intervals . Thanks

Call function periodically in Java

we need run one function periodically in Java web application . How to call function of some class periodically ? Is there any way that call function when some event occured like high load in server ...

Cron in Google App Engine

I have made an app using Google App Engine in python of weekly Project and assessment report submitting. I want to check that on Friday who have submitted the report and who don t just send the ...

Mysql trigger/events vs Cronjob

I have an auction website which let my users place an unlimited amount of autobiddings. To monitor these autobiddings something has to check the database every second. My question is if it is ...

Run a PHP script every second using CLI

I have a dedicated server running Cent OS with a Parallel PLESK panel. I need to run a PHP script every second to update my database. These is no alternative way time-wise, it needs to be updated ...

Batch Job Dependencies Using Open Source/Free Software

I run a large data warehouse plant where we have a lot of nightly jobs running concerruently however many have dependencies on a extract or data load process before they start. Currently we use an ...

Automatic Database reads/write every second

I am making an auction website, which has an auto-bid system. This system lets people make biddings without having to be there. My question is how to implement such a system. I have made the php ...

热门标签