linux - 通过 shell 脚本实现自动化

标签 linux bash shell hive scheduled-tasks

我有一个脚本来验证配置单元表。 如何使用 shell 脚本自动执行此验证过程,以便脚本定期运行? 请帮我提供一些建议吗?

最佳答案

1) 检查 watch 和 at 命令。

每 100 秒执行一次的示例:

watch --interval=100 test.sh 参数

用于在指定时间运行:

at -f test.sh -v 10:25

2)使用crontab

请参阅此处的示例:https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#

关于linux - 通过 shell 脚本实现自动化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42918907/

相关文章:

linux - pthread_mutexattr_setrobust 可以应用于 pthread_rwlock_t 吗?

arrays - 检查数组中索引或键的最简单方法?

bash - 打印标准时间 - 例如 04 :52:06 PM - Bash

windows - 将在 Windows 或 Linux 下运行的 Perl 序言

mysql - nrpe: 命令 mysql_check 未定义

bash - 通过 ssh 运行交互式 Bash 命令

linux - 在 linux bash 脚本中杀死一个 10 分钟的老僵尸进程

shell - 在 Windows 本地运行 mysqldump 命令

linux - 在内部使用 sudo 命令运行脚本时出现问题

Python ssh 连接到交互式程序(例如,python 解释器)