Scheduled tasks with Cron

Use Cron jobs as a way to schedule recurring tasks for your application. When working with Cron, Amezmo manages the creation of the crontab file that is required to execute your task, and the logging of the task output so you can see the results in your Amezmo dashboard. Crons are executed from your applications current release directory.

Schedules

A cron schedule represents when the task will be executed. Amezmo provides a simple representation of the complex and often times confusing cron expression syntax.

Scripts

A cron script is a bash script where you define your task logic. In this script, you may call into other services such as PHP, Node.js and anything you'd normally do from the command line. Scripts run on your instance and in the current working directory as your most recent release.

Best practices

It's best to use a Cron job as a means to invoke another script. Don't put any logic into your Cron job. Keep your business logic in your git repository so that any updates won't require an update to your Cron job as well.