在Linux上安排工作 [英] Schedule job on Linux
本文介绍了在Linux上安排工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我有一个exe预定从一个sql server到oracle数据库的记录。这在Windows服务器环境中工作正常。
我必须在基于Linux的环境中安排相同的exe。你能否指导我如何在Linux中创建类似函数的Windows调度程序。
Dear All,
I have one exe scheduled that pull records from one sql server to oracle database. This works fine in Windows server environment.
I have to schedule same exe in Linux based environment. Can you please guide me how to create a windows scheduler like function in Linux.
推荐答案
尝试cron或at,有很多关于 Google [ ^ ]。
Try cron or at, there are a lot of tips on Google[^].
你应该使用cron -e
Crontab字段和允许范围(Linux Crontab语法)
字段描述允许值
MIN分钟字段0到59
HOUR小时字段0到23
DOM每月1-31
MON月fiel d 1-12
DOW星期几0-6
CMD命令任何要执行的命令。
示例
30 08 10 06 * / home / ramesh / full-backup
You should use cron -e
Crontab Fields and Allowed Ranges (Linux Crontab Syntax)
Field Description Allowed Value
MIN Minute field 0 to 59
HOUR Hour field 0 to 23
DOM Day of Month 1-31
MON Month field 1-12
DOW Day Of Week 0-6
CMD Command Any command to be executed.
example
30 08 10 06 * /home/ramesh/full-backup
编写具有可执行权限的shell脚本。使用此文件crontab为特定时间的特定任务添加。
write a shell script with executable permission. With this file crontab to be added for the particular task for particular time.
这篇关于在Linux上安排工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文