I would like to run uptime checks using Stackdriver only when my google cloud instance is running (it is service that only runs a few hours every day). Is that possible?
No, Stackdriver uptime check run according to your check interval "Check every" field.
You can choose between 1, 5, 10, or 15 minutes. For example, choosing 5 minutes will cause each geographic location to attempt to reach your service once in every 5 minute period. Using the default six locations, and checking every 5 minutes, your service sees an average of 1.2 requests per minute. Checking every 1 minute, your service sees an average of 6 requests per minute.
See the documentation Here