问题
I want to run oozie coordinator with start time as sysdate. How do I do that?
is it possible to put sysdate as start date ? Will it catch up?
回答1:
You can make coorodinator's "start" refer to a variable - startTime, then overwrite its value with sysdate from command line, such as:
oozie job -run -config ./coord.properties -DstartTime=`date -u "+%Y-%m-%dT%H:00Z"`
adjust the time format if you are not using UTC time zone in your system.
sample coordinator job xml:
<coordinator-app name="my-coord"
frequency="${frequency}" start="${startTime}" end="${end}" timezone="UTC"
xmlns="uri:oozie:coordinator:0.4">
<action>
<workflow> ...
coordinator attribute file coord.properties:
...
startTime=2014-05-19T22:00Z
end=2015-01-19T22:08Z
frequency=60 ...
来源:https://stackoverflow.com/questions/27262938/oozie-coordinator-with-sysdate-as-start-time