1. Schedule refresh will always fail if at that time laptop hosting data source if offline.
2. Once you install gateway on server where your sql database is and your report is published to power bi service, you can have to configure gateway first and then published datasets to use that gateway.