2

月末の午後2時にスクリプトを実行する必要があります。午後2時に設定した理由は、アジア/カルカッタのタイムゾーンがあり、10時間30分異なるためです。サーバー時間から。

スクリプトを設定date_default_timezone_set('Asia/Calcutta')したので、現在の設定では、タイムゾーンに従って毎月1日をトリガーできます。

しかし、問題は、私がwebminを使用していて、毎月の終わりに実行する設定がなく、1から31までの日付のみがリストされていることです。ここにスクリーンショットを添付しました。
ここに画像の説明を入力してください

毎月月末の午後2時にスクリプトを実行するにはどうすればよいですか?

どんな助けでも大歓迎です、ありがとう!

4

2 に答える 2

3

The simple way, but ugly

is set to run on every 28,29,30,31 days. Each time when script is launched compare current day with max days in current month using bash/oerl script

于 2011-12-02T05:18:04.440 に答える
3

Have it run every day starting the 28th of every month through the first of the next month. In the script, check if tomorrow is the first day of a month. If so, run, else die.

于 2011-12-02T05:18:09.500 に答える