$dayBeforeYesterdayStart]); } ); // 每15分钟执行一次 new Crontab('20 */3 * * * *', function () { $yesterdayStart = date('Y-m-d', strtotime('-1 day')); dump($yesterdayStart . '更新' . GoogleAdsDateDatas::type . '开始'); Event::emit(GoogleAdsDateDatas::type, ['date' => $yesterdayStart]); } ); // 每15分钟执行一次 new Crontab('30 */3 * * * *', function () { //获取今天的 0 点的YYYY - MM - DD格式 $todayStart = date('Y-m-d', strtotime('0 day')); dump($todayStart . '更新' . GoogleAdsDateDatas::type . '开始'); Event::emit(GoogleAdsDateDatas::type, ['date' => $todayStart]); } ); // 每15分钟执行一次 new Crontab('15 */3 * * * *', function () { dump(date('Y-m-d H:i:s') . '更新' . GoogleAdsAssetRelations::IMAGEASSET . '开始'); Event::emit(GoogleAdsAssetRelations::IMAGEASSET, []); } ); // 每15分钟执行一次 new Crontab('30 */3 * * * *', function () { dump(date('Y-m-d H:i:s') . '更新' . GoogleAdsGroups::type . '开始'); Event::emit(GoogleAdsGroups::type, []); dump(date('Y-m-d H:i:s') . '更新' . GoogleAdsCampaigns::type . '开始'); Event::emit(GoogleAdsCampaigns::type, []); } ); // 每15分钟执行一次 new Crontab('5 */11 * * * *', function () { dump(date('Y-m-d H:i:s') . '更新' . GoogleAdsAds::type . '开始'); Event::emit(GoogleAdsAds::type, []); } ); // 每15分钟执行一次 new Crontab('25 */19 * * * *', function () { dump(date('Y-m-d H:i:s') . '更新' . GoogleAdsAssets::type . '开始'); Event::emit(GoogleAdsAssets::type, []); } ); // new Crontab('* */2 * * * *', function () { // dump(date('Y-m-d H:i:s') . '更新' . GoogleAdsAssetRelations::IMAGEASSET . '开始'); // Event::emit(GoogleAdsAssetRelations::IMAGEASSET, []); // }); new Crontab('55 */51 * * * *', function () { dump(date('Y-m-d H:i:s') . '更新' . GoogleAdsAssetRelations::VIDEOASSET . '开始'); Event::emit(GoogleAdsAssetRelations::VIDEOASSET, []); } ); new Crontab('0 */1 * * * *', function () { dump(date('Y-m-d H:i:s') . '更新' . GoogleAdsCustomers::CUSTOMERADD . '开始'); Event::emit(GoogleAdsCustomers::CUSTOMERADD, []); } ); // 每15分钟执行一次 // new Crontab('58 */15 * * * *', function () { // dump(date('Y-m-d H:i:s') . '更新' . GoogleAdsCampaigns::type . '开始'); // Event::emit(GoogleAdsCampaigns::type, ['customer_id'=>4060397299]); // // }); // 每30分钟执行一次 // new Crontab('0 */30 * * * *', function () { // dump(date('Y-m-d H:i:s') . '更新' . V2ex::type . '开始'); // Event::emit(V2ex::type, null); // // dump(date('Y-m-d H:i:s') . '更新' . GitHub::type . '开始'); // Event::emit(GitHub::type, null); // // dump(date('Y-m-d H:i:s') . '更新' . JueJin::type . '开始'); // Event::emit(JueJin::type, null); // }); } }