Windows版本的cron是什么?
时间:2020-03-06 14:43:02 来源:igfitidea点击:
Google搜索打开的软件执行与cron相同的功能,但Windows内置任何功能。
我正在运行Windows XP Professional,但是任何版本的Windows的建议都可能对某人有所帮助。
是否还有一种方法可以通过编程方式或者通过命令行调用此功能(基于答案的功能称为"任务计划程序")?
解决方案
对于原始问题,询问有关Windows XP(和Windows 7)的信息:Windows Task Scheduler
对于命令行用法,可以使用AT命令进行计划。
对于较新的Microsoft OS版本,Windows Server 2012 / Windows 8,请查看schtasks命令行实用程序。
如果使用PowerShell,则将Windows PowerShell中的"计划任务" Cmdlet用于脚本编写。
使用Windows Task Scheduler来安排时间和日期上的任务。
'at'命令。
"The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command."
Windows的" AT"命令与cron非常相似。可通过命令行使用。
除了Windows Task Scheduler,我们在Windows上也有" at"。除了它具有命令行界面之外,我不确定它与Task Scheduler有何不同。
最接近的等效项是Windows Scheduled Tasks(控制面板-> Scheduled Tasks),尽管它们与cron相距甚远。
(对我而言)最大的不同是,它们要求用户登录Windows框和用户帐户(带有密码及全部),如果本地安全策略要求定期更改密码,那么这将成为噩梦。我还认为,就设置项目的运行间隔而言,它不如cron灵活。
Is there also a way to invoke this feature (which based on answers is called the Task Scheduler) programatically [...]?
MSDN上的任务计划程序API。
如果我们更喜欢优秀的Cronw,那么CRONw是不二之选。
Supported systems * Windows 2000 (any version) works * Windows XP (SP 2) works * Windows Server 2003 works * Windows NT 4 (SP 6) should work but not tested * Windows 3.11, Windows 95, Windows 98, Windows ME, Windows XP beneath SP2 not supported by design
Zcron可供个人免费使用。