簡體   English   中英

如何在月初觸發Clockwork任務?

[英]How to trigger Clockwork task at the beginning of the month?

我想每個月初開始執行任務。 例如:

2017-01-01 00:00:00 // January has just started
2017-02-01 00:00:00 // February has just started ...
...

如何使用發條裝置做到這一點?

采用:

every(1.day, 'myjob', at: '00:00', :if => lambda { |t| t.day == 1 }) do ... end

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM