Skip to main content

Scheduled tasks

Lesson 7 of 11 · 2 min 38 s. Episode 7 of the Jaah tutorial series: set up recurring work once and let it file itself. Create a scheduled job that keeps an app's dependencies up to date every morning, say when it runs and for which project, let it run unattended, try it at once with Run now, follow the task it files to the finish, and look back over its runs.

Before you start​

  • A project connected to Jaah, picked on Tasks. The example is TimeSaver, a time-tracking app for small teams.
  • Tests in the project, so the agent can make sure the app still works after it updates something.

Steps​

  1. Click Automation, in the sidebar. The Schedule lists the work that runs on its own, and ours is still empty. Some work comes round again and again, like keeping the app's dependencies up to date, and a schedule saves asking for it each time.
  2. Press Create Cron to set up a scheduled job. Under Name, give it a name the team will recognise: Morning dependency updates. Under Instructions, say what you want done, in your own words, the way you'd write a task: Update the app's outdated dependencies to their latest versions.
  3. Press Edit beside the schedule. It already runs every day, so only the hour changes: pick 6 and unpick 9, so it runs at six, before anyone starts work. Under the schedule, the console spells out when the next run will be.
  4. Under Projects, pick the TimeSaver app, so the work is done in its code. Persona and Model choose who does the work; the defaults suit a job like this, and the next lesson is about changing them. Full auto is already ticked, so the agent decides everything itself: at six in the morning, nobody is around to answer a question. Leave it Enabled, and press Create cron.
  5. On the job's own page, press Run now. The job is saved and will run tomorrow at six, but Run now runs it straight away, exactly as it will every morning, and the console confirms that it has fired.
  6. Go back to Tasks. The job has filed a task of its own, with its instructions as the request. From here it's ordinary work: it waits its turn, an agent takes it on, and the feed shows how far it has got, like any task you file yourself.
  7. When it's finished, open the task and go to Details. Under Outcome, the agent explains what it updated, how it made sure the app still works, using TimeSaver's own tests, and anything it chose to leave for a person to decide.
  8. To look back over a job, open it from the Schedule and go to Runs. Each run is listed with what it did, here the task it created, and when, so a morning when it did nothing is easy to spot.

What you learned​

  • Automation, in the sidebar, opens the Schedule: the work that runs on its own.
  • A scheduled job has a name, instructions written the way you'd write a task, a schedule, and a project to work in. Full auto lets it decide everything itself when nobody is around.
  • Run now starts a job at once, so you can see what it does without waiting for the morning.
  • The job files an ordinary task, followed and read like any other, and its Runs tab lists every run with what it filed and when.

Next​

Next lesson: Personas and models. Previous: Organizing your tasks.

Related: How schedules work · Create an automation schedule · Run, pause or change a schedule.