If the x job must run at 05:00, you can delay the job's submission in Time dependencies 'Do not submit before' 05:00 in the job.
If you need to check the hour the application starts to run, try to use the built-in APPL._RHH variable in a javascript in the job at run time. For example,
if (APPL._RHH >= '21' || APPL._RHH <= '02') WOB.time = '5am';
And, use the %WOB.time variable as the job's run criteria.
Hope this helps.