如何在GAE中的cron.xml中安排作业,使作业仅在周六上午6点以后每5小时运行一次 [英] How to schedule job in cron.xml in GAE such that job runs every 5 hours after 6:00 am only on Saturday

查看:103
本文介绍了如何在GAE中的cron.xml中安排作业,使作业仅在周六上午6点以后每5小时运行一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用cron.xml在GAE中安排一项工作。
我的要求是这样的:
从星期六上午6点开始每5小时一次。

I want to schedule a job in GAE using cron.xml. My requirement is something like this: Every 5 hours from 6:00 am on Saturday.

推荐答案

计划格式不支持此类计划规范。

The Schedule format doesn't support such schedule specification.

但是您可以使用包含部分规范的时间表,并在计划作业本身中完成其余部分。

But you can use a schedule which contains part of your specification and complete the rest inside the scheduled job itself.

例如,您可以在6:00到0:00之间每隔5小时使用一次cron时间表,并在预定的工作中进行第一件事是检查今天的日期并退出如果不是星期六。

For example, you can use a cron schedule like every 5 hours from 6:00 to 0:00 and inside the scheduled job 1st thing you do is check today's day and exit if it's not Saturday.

这篇关于如何在GAE中的cron.xml中安排作业,使作业仅在周六上午6点以后每5小时运行一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆