Hello, World#

The smallest possible job: write one line to the console. Create a file named hello.js, paste this in, and run it.

The Script#

// hello.js
console.log("Hello from GearTrain!");

How It Works#

  • The top-level code runs once per run, from top to bottom. There is no main function and no entry point to wire up.
  • console.log output is captured and streamed to the run’s live console. console.info, console.warn, and console.error work the same way.

Setup#

Add a job that points at hello.js and click Run now to see the output right away, or schedule it with */15 * * * * to run every 15 minutes.