AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[schedule](ubuntu)

Martin Hope
Angular Orbit
Asked: 2019-10-29 22:17:24 +0800 CST

Crontab 未运行任务 [重复]

  • 1
这个问题在这里已经有了答案:
如何在 crontab 中使用通知发送?[重复] (2个答案)
2年前关闭。

然后我crontab -e添加了*/2 * * * * /usr/bin/notify-send "test",它应该每 2 分钟发送一次通知,但它不起作用。

crontab 文件如下所示。

# Edit this file to introduce tasks to be run by cron.
# 
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
# 
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').# 
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# 
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
# 
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# 
# For more information see the manual pages of crontab(5) and cron(8)
# 
# m h  dom mon dow   command

*/2 * * * * /usr/bin/notify-send "test"
cron schedule notify-send 19.04
  • 1 个回答
  • 744 Views
Martin Hope
tomasz-groch
Asked: 2019-10-06 23:55:20 +0800 CST

在一周中的选定时间运行 AIDE

  • 1

如何配置 aide linux 以在一周中的选定时间启动,例如周日 9 点?

schedule 18.04
  • 1 个回答
  • 267 Views
Martin Hope
djsony90
Asked: 2019-03-31 13:23:03 +0800 CST

Cronjob 每 1445 分钟

  • 4

首先,对不起我的英语不好。我是 Crontab 的新手,我正在制定一些时间表。我正在用 Python 从互联网上抓取一些数据,我有这个网站,当你抓取一些数据时,你必须等待 24 小时才能获取下一部分数据,所以如果我的 cronjob 每天从 00.00 开始,它需要一些运行 Selenium 并抓取数据的秒数。第二天必须以几秒钟的偏移量运行,以确保从我进行抓取的那一刻起 24 小时内完成,而不是从工作开始的那一刻起 24 小时内完成。那么,有什么方法可以每天运行作业,比前一天延迟 5 分钟,或者我需要在 python 脚本中做一些每天睡得更久的东西。

对不起,很长的帖子

suspend cron schedule python3
  • 3 个回答
  • 180 Views
Martin Hope
gsamaras
Asked: 2018-10-26 01:18:31 +0800 CST

使用 security.conf 授予调度权限

  • 0

我正在运行一个 C++ 程序,它想要执行自己的调度策略。它不断发出警告说它没有权利,我想给它它想要的所有权利!

我试着做:

sudo nano /etc/security/limits.conf

并添加:

@users          -       rtprio          99
@users          -       nice            -19

然后我做了:sudo usermod -aG users gsamaras,gsamaras我在哪里,唯一的用户。

关闭终端并再次尝试后,它仍然会发出警告。

我也尝试过直接使用gsamaras而不是@usersin limits.conf,但仍然没有运气。有任何想法吗?

configuration security users schedule 16.04
  • 1 个回答
  • 32 Views
Martin Hope
ignarukih
Asked: 2018-10-22 17:55:45 +0800 CST

将 grub2 设置为在工作日启动到 Ubuntu,在周末启动到 Windows

  • 2

使用该线程的出色答案,我已经能够安排在一天中的不同时间启动到不同的操作系统。

但是,我想就如何在工作日启动 Ubuntu 和在周末启动 Windows 获得社区的建议,而不是反复尝试将自己变成砖砌的笔记本电脑。

我现有的/boot/grub/custom.cfg看起来像这样:

insmod datehook

if [ $MINUTE -lt 10 ]; then PADDING="0"; else PADDING=""; fi
TIME=$HOUR$PADDING$MINUTE

if [ $TIME -ge 0 -a $TIME -lt 559 ]; then
  set default="Windows Boot Manager (on /dev/nvme0n1p2)"
fi

if [ $TIME -ge 1000 -a $TIME -lt 1659 ]; then
  set default="Ubuntu"
fi

if [ $TIME -ge 1700 -a $TIME -lt 2359 ]; then
  set default="Windows Boot Manager (on /dev/nvme0n1p2)"
fi

即使有人知道沙盒模式,它可以让我试错我的方式来得到一个很好的答案,但我也很感谢社区的一些最佳实践输入。

谢谢!

grub2 windows dual-boot schedule
  • 1 个回答
  • 410 Views
Martin Hope
Luke
Asked: 2018-04-23 22:36:16 +0800 CST

cron 会自动适应时区变化吗?

  • 1

我添加了cron一份工作crontab -e。然后,我更改了时区。

但是,该工作似乎cron仍在旧时区进行。

我需要重新启动它cron吗?(例如service cron reload)

谢谢。

cron timezone schedule
  • 1 个回答
  • 2964 Views
Martin Hope
nixnotwin
Asked: 2010-10-23 03:06:37 +0800 CST

如何安排从休眠中唤醒?

  • 14

是否可以在预定义的时间将 Ubuntu 从休眠中唤醒?它不应该是WOL,而是 Ubuntu 唤醒自己。例如,它应该做应用程序WakeupOnStandBy在 MS Windows 上所做的事情。

boot hibernate scheduled wakeup schedule
  • 3 个回答
  • 10515 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve