I found that sometimes in my Dashboard it is failing to connect, so that again I have to manually reload the dashboard again and again until it Connects and Reloads, to overcome this I used below script. Hope this helps others who are facing similar type of issues.
SET vIndex = 1 ;
ODBC CONNECT TO [PROD_DB;DBQ=PROD] (XUserId is dummyUser, XPassword is dummyPWD);
IF Len(ConnectString()) = 0 THEN // If Database is connected then ConnectString() will give you the active connection string otherwise empty string is returned
SET vIndex = 1; // If database is not connected then initialize variable to repeat the loop
SET vIndex = 2; // If database is not connected then initialize variable to repeat the loop
LOOP WHILE vIndex = 1;