计划任务 Linux 与 Windows
我正在尝试将 crontab(Linux) 的时间参数(格式如下(* * * * *))转换为 schtasks(Windows) 的相应时间参数,这比 crontab 的时间参数要复杂一些。
我正在编写一个应用程序来执行此操作,并且它变得越来越复杂,因为 crontab 有很多提供时间参数的可能性/排列。
我想知道这是否是编写用于转换参数的程序的正确方法,或者是否存在更好的方法来实现此目的?
由于 crontab 中的参数可以通过多种可能的方式提供,例如 (0 0 1,10,15 * *) 会将任务安排在 1 日、10 日和 1 日午夜。本月 15 日。那么,schtasks 是否有可能采用可以执行相同类型调度的参数?
I'm trying to convert the time parameter of crontab(Linux) which is formatted like this(* * * * *) to the corresponding time parameter of schtasks(Windows) which is kind of complex then that of crontab.
I'm in the middle of writing an application for doing this and its kinda getting more and more complex since crontab have so many possibilities/permutations for providing the time parameter.
I was wondering if this is the right approach to write a program for converting the parameter, or there exist any better approach for achieving this?
And since parameters in crontab can be provided in many possible ways like (0 0 1,10,15 * *) would schedule the task for midnight on 1st ,10th & 15th of month. So, is it possible at all for schtasks to take parameters that can do the same kind of scheduling?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您检查过 Windows 的这些 cron 端口吗?
Have you checked these cron ports to Windows?