Time Check.

10 pts.
Tags:
LotusScript
Hi All I have an scheduled agent. I want to check in this agent if the day is Sunday and the time is between 5:00 AM to 10:00 AM just exit do not continue the agent. Please provide me a solution. Thanks Ayushi

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,
Try this formula:

REM "checks the actual weekday and returns the number; 1 = Sunday";
weekday:=@Weekday(@TextToTime("today"));

REM "checks if the time is between 5 and 10; 1 = True";
time:=@If(@TextToTime("today")>@Time(10;0;0);0;@If(@TextToTime("today")<@Time(5;0;0);0;1));

REM "checks if both statements are true; if the weekday and time are true it stops execution.";
REM "replace the 'do something' string in the @If condition to do something in case it isn't within criteria";
@If(weekday = 1 & time = 1; @Return("") ; "do something")

Regards,
tobo

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • shivasanjay
    Samething can be done using lotusscript.
    logic:check the day =sunday and time="restricted operation time" exit the program else continue.
    But this is the case when scheduled agent runs more than once a day, and that too every x hours y minutes.Check is it really required?
    2,265 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following