Running cron jobs during test execution

Hi,

Im wondering if there is a way to use a cron job to sleep in robotframework

Certain processes run at 30s past the minute every minute, and Im wondering if there is a way sleep until this time?

Hi Adam,

This should do what you want:

BigLez.robot

*** Test Cases ***
Big Lez Test
	Sleep Till Half Past


*** Keywords ***
Sleep Till Half Past
		${min} = 	Get Time 	min
		IF 	${min} < 30
			${TTS}=		Evaluate    30 - ${min}
		ELSE
			${TTS}=		Evaluate    (60 - ${min}) + 30
		END
		Log 	${TTS}
		Sleep 	${TTS}

Hope that helps,

Dave.

2 Likes