Image from pixabay.com

TSCron — A Google Forms Cron Scheduler powered by Google Apps Script

Laura Taylor
3 min readOct 2, 2017

Introducing TSCron — an open source Google Forms based Cron scheduler powered by Google Apps Script.

Cron scheduling is available for:

  • Minutes
  • Hours
  • Days
  • Weeks
  • Months
  • Years
  • Custom date/time (runs once)

Endless possibilities exist for TSCron:

  • Send a Google Docs newsletter to clients on the 1st of every month
  • Populate a Google Sheet with Google Analytics data every 4 weeks
  • Email event attendees a link to Google Slides 1 hour after the presentation
  • Notify warehouse managers of new regulations every 3 months on the 1st of the month
  • Send an email to a colleague every 3 days
  • Send yourself a list of goals every January 1st
  • Add new todos to a Trello board every Sunday at 9:00 PM
  • Send invoices to customers on the "last day" of every month
  • Post a message to a Slack channel daily at 8:00 AM
  • Automatically create a Sales Forecast presentation with Google Slides and share it with your manager every 6 months
  • Send school activity updates to parents every Monday at 8:00 AM
  • Run a backend microservice every 3 hours

How It Works

A submission to a TSCron enabled Google Form initiates a new cron job (any previously scheduled cron job is removed).

Each form submission contains responses for both:

  • pre-existing TSCron configuration form elements (i.e. cron interval configuration, start date and optional end date)
  • any user defined form elements which are needed to implement the cron job

TSCron uses the configuration to “schedule” the new cron job at the selected start date/time and to “reschedule” the cron job at the desired cron interval. If an optional end date is specified, TSCron will stop the cron job at that date/time.

The form owner (or a form collaborator) implements the cron job in a provided cronJob() function using Google Apps Script. (TSCron executes this cronJob() function on the start date/time and on each repeating cron interval.)

Cron scheduling occurs in the form owner’s default time zone and takes into account:

  • short months (e.g. February, April, June, September, November)
  • leap years
  • daylight savings time

Want your own copy of TSCron?

See the project, installation and getting started guide on Github:

Need help automating processes inside your G Suite organization? Get in touch

Follow me on Twitter, Medium & Github.

Enjoy this post? Please buy me a coffee. Thank you!

--

--

Laura Taylor
Laura Taylor

Written by Laura Taylor

Google Developer Expert for G Suite passionate about Workflow Automation and Productivity — https://www.tech-streams.com

No responses yet