简体   繁体   中英

How to trigger Clockwork task at the beginning of the month?

I would like to run task every beginning of the month. Eg:

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

How to do this using clockwork?

采用:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM