Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Launchd 每月最后一天的启动计划_Launchd - Fatal编程技术网

Launchd 每月最后一天的启动计划

Launchd 每月最后一天的启动计划,launchd,Launchd,我正在尝试使用Launchd为每个月的最后一天安排一项工作,但我不太确定如何做。似乎我得到的唯一选项是选择月份日期的数字,因此,例如,我可以选择在第31天运行,但2月和9月会发生什么?如果值为31,Launchd是否只在每月的最高天数运行它 谢谢你的帮助 -Dan恐怕没有一种“好”的方式来表达每个月的最后一天。如果你选择“31”,它就不会在2月或30个月内运行 你能不能绕过这个要求,简单地使用每月第一天的午夜 您可以在plist中详细地执行以下操作,并定义每个月的最后一天。它将在闰年中断,二月有

我正在尝试使用Launchd为每个月的最后一天安排一项工作,但我不太确定如何做。似乎我得到的唯一选项是选择月份日期的数字,因此,例如,我可以选择在第31天运行,但2月和9月会发生什么?如果值为31,Launchd是否只在每月的最高天数运行它

谢谢你的帮助

-Dan

恐怕没有一种“好”的方式来表达每个月的最后一天。如果你选择“31”,它就不会在2月或30个月内运行

你能不能绕过这个要求,简单地使用每月第一天的午夜

您可以在plist中详细地执行以下操作,并定义每个月的最后一天。它将在闰年中断,二月有29天

<key>StartCalendarInterval</key>
<array>
    <dict>
        <key>Day</key>
        <integer>31</integer>
        <key>Month</key>
        <integer>1</integer>
    </dict>
    <dict>
        <key>Day</key>
        <integer>28</integer>
        <key>Month</key>
        <integer>2</integer>
    </dict>     
    <dict>
        <key>Day</key>
        <integer>31</integer>
        <key>Month</key>
        <integer>3</integer>
    </dict>
</array>
StartCalendarInterval
白天
31
月
1.
白天
28
月
2.
白天
31
月
3.

是的,我很害怕。不过,我会接受你的第一个建议。谢谢是的——对于绝大多数人来说,一个月第一天的第一秒钟应该足够好:-)祝你们好运。