title: Delayed or Random Tasks with Google Cloud Scheduler
body: <p>I'm currently running 2 scripts on a weekly schedule on a raspberry pi with the following configuration:</p>
  
  <p>Cron executes a python script at a fixed time weekly. This python script waits between 0 and 50 hours then runs python script A. It waits about 16 hours and runs script A again 3 more times every 8 hours (The script takes about 4x longer to run the first time). 8 hours after the 4th run it runs script B.</p>
  
  <p>I would like to move my scripts to Google Cloud VM for improved reliability but running the VM 24/7 just to run 30 hours worth of computations over a 100 hour period is inefficient and expensive.</p>
  
  <p>I know I can use Google Scheduler as my cron to initiate the VM weekly but I still risk letting it run up to 50 hours waiting for script A to run. I understand cron supports adding a random sleep interval as listed in the <a href="https://stackoverflow.com/questions/9049460/cron-jobs-and-random-times-within-given-hours">example here</a>:</p>
  
  <pre><code>30 8-21/* * * * sleep ${RANDOM:0:2}m ; /path/to/script.php
  </code></pre>
  
  <p>However, from what I've discovered, Google Cloud Scheduler is limited to 60 minutes and rightfully so. In this case what are my options? Does Google Cloud Task support delayed triggering of VM (up to 50 hours)? Is this something Pub Sub would support instead?</p>
  
  <p>My scripts use a python library that I don't think is compatible with Google App Engine so I would further need to figure how to trigger a specific script in the VM on trigger.</p>