Cron expression with different start time in test schedule trigger

hello,

can we have a cron expression where we can have different start time to trigger a test schedule?

i have 2 test schedule with cron expressions:

  • 51 0/5 * 1/1 * ? *
  • 10 0/2 * 1/1 * ? *

sometimes the test schedules clashes, means both execute at same time at some point of time

i want to avoid two scheuldes to trigger test simultaneously

thanks

@nikhil.chandre

there would definitely be an over lap as the time different is less so the multiple of those would be the same triggers

you cannot create a multi cron in one schedule, there needs to be two

Also if it is getting triggered so often as 2 mins and 5 mins you can trigger it at 2 mins only as every 5 min trigger there will be a 2 min trigger which executes very close

cheers

Hi @nikhil.chandre,

yes, that can happen sometimes when 2 triggers schedules are pretty close like the one mentioned above.

However, if you have only 1 robot/machine for that folder, even though those gets triggered at the same time, only 1 would get executed and other would remain in Pending state.

Regards
Sonali

hello @Anil_G

isn’t there a way to avoid the overlap?

thanks

@nikhil.chandre

just run the 2 mins triggers then no over lap …or reduce 2 mins to 1.5 or so if you need more frequency

cheers

hello @Anil_G

can you provide cron expression for this?

thanks

@nikhil.chandre

The second expression you gave is already same

Cheers

still it is getting overlapped @Anil_G

@nikhil.chandre

What overlapp is happening?

ideally if only one cron is there it would run with that only

please explain

cheers

i have two test schedule

so when on next run time, at some point of time it is nearly same , so those two schedules run nearly at same time

i want to avoid this

@nikhil.chandre

the advise was to use only one schedule as anyways 5 seconds will be same as 2 minutes and obviously there will be overlap as the multiple of those would over lap

you need to use only single cron

cheers

okay

as per requirement i need to use two test schedules which run on two remote machines

would this be fine to avoid overlap

@nikhil.chandre

Choose 57 seconds and 2 mins that might avoid most…

Also what do you mean by over lap starting at same time or running at same time?

Strting can be avoided but run ing does overlap as one will be less thant he other

Cheers

by overlap i meant, on next run time , it should avoid run at same time

also you mention avoid overlap at start time , can we do that?

@nikhil.chandre

Depending on the runtime of the test cases you need to give a time gap of minimum of that

Generally two schedules would over lap at some point if the runtime is greater than 40 seconds

Cheers

okay,

could we change the start time of the trigger ?

so that it triggers at multiple of that start time

suppose

start time o min
next run times: 0 10 20 30 40 50

start time 15 min
next run times: 15 30 45 60

could we have a cron expression so that start time of two triggers are different
and multiple of that start time won’t get overlapped with other

@nikhil.chandre

Ideally thats whan i said if runtime is greater than 40 then it would hve an overlap

If you see your scenario also 30 is an overlap

If trigger can be so apart then try 3 minutes and start at 43 second and 7 minutes start at 27 seconds

These are ballprk numbers mostly there should not be any over lap as they are no common multiples till 60

Cheers

could you provide cron expression for two schedules?

@nikhil.chandre

43 0/3 * 1/1 * ? *

27 0/7 * 1/1 * ? *

please use this site where you can generate cron

cheers

1 Like

thanks

will check

currently not getting overlapped

still will check in between

1 Like