# When I insert an if block into the ScheduledTask, I'm entering the password and the program is closing

I'm new in Mathematica. So I'm unable to settle a matter. When I insert an if block into the ScheduledTask, I'm entering the password and the program is closing. What is my mistake? Can you help me please?

obj = SessionSubmit[

• Did you try just If[URLRead... to see how your condition works? Also === would be more appropriate, and even more MatchQ[ KeyValuePattern["StatusCode"->_] ]. – Kuba Dec 30 '20 at 12:24