Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

任务计划分钟计划执行为秒问题 #190

Open
NanWang000 opened this issue May 6, 2021 · 0 comments
Open

任务计划分钟计划执行为秒问题 #190

NanWang000 opened this issue May 6, 2021 · 0 comments

Comments

@NanWang000
Copy link

Please answer these questions before submitting your issue. Thanks!
在你提交 issue 前,请先回答以下问题,谢谢!

What version of Go and cronsun version are you using?
你用的是哪个版本的 Go 和 哪个版本的 cronsun?
centos7没有安装go,cronsun-v0.3.5

What operating system and processor architecture are you using (go env)?
你用的是哪个操作系统,什么架构的?
CentOS Linux release 7.6.1810 (Core)
架构为3个etcd和3个mongodb

What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
你做了什么,遇到了什么问题?尽可能描述清楚问题,最好把操作步骤写下来,按这些步骤操作后能重现你的问题。
我在计划任务中,cronsun 不支持管道和重定向,搞定到计划任务部分需要,我做了测试。
1.首先centos上可以执行,命令如下,你会发现手动执行可以“2021-04-26 10:47:07” 有这个结果。
image

我设置* */1 * * * * 按道理执行为每分钟1次,但是实际更新出来为每秒一次
[root@bogon ~]# tailf /tmp/date2.txt
2021-05-06 18:14:52
2021-05-06 18:14:53
2021-05-06 18:14:54
2021-05-06 18:14:55
2021-05-06 18:14:56
2021-05-06 18:14:57
2021-05-06 18:14:58
2021-05-06 18:14:59
2021-05-06 18:15:00
2021-05-06 18:15:01
2021-05-06 18:15:02
2021-05-06 18:15:03

[root@bogon ~]# more /root/ech2.sh
echo $(date "+%Y-%m-%d %H:%M:%S") >>/tmp/date2.txt
What did you expect to see?
你期望得到什么样的结果?
不用分钟和秒同时用才可以。
What did you see instead?
现在你得到的结果是什么样的?
分钟和秒执行错乱问题。,如何解决,不用分钟和秒同时用才可以。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant