简体   繁体   English

从 Control-M 中的订单日期减去 2 分钟

[英]Subtract 2 minutes from order date in Control-M

In Control-M, I have a job that's scheduled 2 minutes after a batch interval ends, eg August 13th, 2021 at 00:02 (local time).在 Control-M 中,我有一个作业安排在批处理间隔结束后 2 分钟,例如 2021 年 8 月 13 日 00:02(当地时间)。

I need to pull files from a server on the format "YYDDMMHHMM.zip" and for example "HHMM" could be 2350 (10-minute frequency);我需要从服务器中提取格式为“YYDDMMHHMM.zip”的文件,例如“HHMM”可以是 2350(10 分钟频率); the order time for that job would be 23:52.该工作的订购时间为 23:52。

How do I subtract 2 minutes from the order date/time?如何从订单日期/时间中减去 2 分钟? And if the system is running in a local time zone, how would one additionally express that result in UTC time?如果系统在本地时区运行,那么如何另外用 UTC 时间表示该结果? That is, the files on the server are timestamped in UTC time.也就是说,服务器上的文件以 UTC 时间为时间戳。

The date parameters in Control-M do not include minutes or seconds, %%$DATE will resolve the yyyymmdd value. Control-M 中的日期参数不包括分钟或秒,%%$DATE 将解析 yyyymmdd 值。

If you want yesterday's date (ie at 1 minute after New Day Processing you want the previous ODAT value) use the CALCDATE facility to subtract (or add) 'x' days.如果您想要昨天的日期(即在新日处理后 1 分钟您想要以前的 ODAT 值),请使用 CALCDATE 工具减去(或添加)“x”天。

If you really want minutes adding/subtracting then that is best done at Unix system level.如果你真的想要加/减分钟,那么最好在 Unix 系统级别完成。

Control-M just takes the time/date from the local system time. Control-M 只是从本地系统时间获取时间/日期。

您可以使用“%%CALCDATE %%TIME -120”,但它会根据 control-m/服务器时间进行计算。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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