admin管理员组文章数量:1130349
I'm using the MEC Events Calendar. I am trying to auto sync my events to Google Calendar.
Here is what the event plugin says:
Important Note: Set a cronjob to call /www/wp-content/plugins/modern-events-calendar/app/crons/g-export.php file at least once per day otherwise it won't export your website events into Google Calendar.
First off, I'm not sure how to do this? I installed the WP Crontrol plugin. With this I can add a PHP Cron Event. I am not sure what code I need to put in here to call it?
I'm using the MEC Events Calendar. I am trying to auto sync my events to Google Calendar.
Here is what the event plugin says:
Important Note: Set a cronjob to call /www/wp-content/plugins/modern-events-calendar/app/crons/g-export.php file at least once per day otherwise it won't export your website events into Google Calendar.
First off, I'm not sure how to do this? I installed the WP Crontrol plugin. With this I can add a PHP Cron Event. I am not sure what code I need to put in here to call it?
Share Improve this question edited Nov 15, 2018 at 4:03 kero 6,3501 gold badge25 silver badges34 bronze badges asked Nov 15, 2018 at 3:29 mattmatt 11 Answer
Reset to default 0Your best option is probably to first explore your current hosting environment for the possibilities of Cronjobs. It might be called "Scheduled Tasks" or similar.
Alternatively you can schedule a task from within WordPress via wp_schedule_event() (though if you're using the default WP Cron, you can't be certain of it running at the specified time) and load that file via
require WP_CONTENT_DIR . '/plugins/modern-events-calendar/app/crons/g-export.php';
I'm using the MEC Events Calendar. I am trying to auto sync my events to Google Calendar.
Here is what the event plugin says:
Important Note: Set a cronjob to call /www/wp-content/plugins/modern-events-calendar/app/crons/g-export.php file at least once per day otherwise it won't export your website events into Google Calendar.
First off, I'm not sure how to do this? I installed the WP Crontrol plugin. With this I can add a PHP Cron Event. I am not sure what code I need to put in here to call it?
I'm using the MEC Events Calendar. I am trying to auto sync my events to Google Calendar.
Here is what the event plugin says:
Important Note: Set a cronjob to call /www/wp-content/plugins/modern-events-calendar/app/crons/g-export.php file at least once per day otherwise it won't export your website events into Google Calendar.
First off, I'm not sure how to do this? I installed the WP Crontrol plugin. With this I can add a PHP Cron Event. I am not sure what code I need to put in here to call it?
Share Improve this question edited Nov 15, 2018 at 4:03 kero 6,3501 gold badge25 silver badges34 bronze badges asked Nov 15, 2018 at 3:29 mattmatt 11 Answer
Reset to default 0Your best option is probably to first explore your current hosting environment for the possibilities of Cronjobs. It might be called "Scheduled Tasks" or similar.
Alternatively you can schedule a task from within WordPress via wp_schedule_event() (though if you're using the default WP Cron, you can't be certain of it running at the specified time) and load that file via
require WP_CONTENT_DIR . '/plugins/modern-events-calendar/app/crons/g-export.php';
本文标签: cronCall a PHP file from Cronjob
版权声明:本文标题:cron - Call a PHP file from Cronjob 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749180444a2328514.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论