@scheduled

@scheduled functions are invoked at specified times

Syntax

  • Lowercase alphanumeric string
  • Maximum of 20 characters
  • Dashes are allowed; underscores are not allowed
  • Must begin with a letter
  • Followed by a valid rate or cron expression (more info here)

Example

This .arc file defines some scheduled functions:

@app
testapp

@scheduled
daily-update-buddy rate(1 day)
friyay-only cron(0 15 ? * FRI *)

Which generates the following code:

/
├── src/
│   └── scheduled/
│       ├── daily-update-buddy/
│       └── friyay-only/
├── .arc
└── package.json

Next: Creating @static asset buckets