Verify the ftp server?

Hello everyone I am using a FTP session activity and it worked .I have some particular exception sometimes the server stopped and after minutes it cames back and this is normal because the internet connexion sometimes fell down so I want to add an exception if the server stopped or there is no new folder after 24h all the process restart from the begining until the two conditions are true
How can i do it please :pray: :pray: :roll_eyes: