# Managed jobs

## Creating a new managed job

1. Click "Managed jobs"
2. Click "Create new managed job"
3. Enter the relevant details:
   1. Name: This name is only for yourself, to recognize the job in your account
   2. Project: Use this to categorize the job
   3. Timezone: This is the timezone in which the job is expected to run
   4. Schedule: The schedule in which you want the job to be run
   5. Maximum duration: The number of minutes the job is expected to run. This should be at least the minimum duration you expect the job to run
   6. Allow overlapping tasks: If you set this to "Yes", we'll skip the execution of a task if a previous version is still running
   7. Number of attempts: We will try to reconnect this many times if the connection fails
4. Enter the endpoint settings: this is everything we send to your endpoint. This can be used for validation purposes.
5. Click "Create managed job"

### Cron schedule expression

```
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
```

## How is the task token used?

Each task gets a random token that is sent with the request to the endpoint as a header. The key will be `X-Cronly-Token`, and the value will be the token itself.

Example: `X-Cronly-Token: 9531ba05-1533-488c-833f-e597f0734c3c`

You can use this token to validate that the request is coming from Cronly, if you like.
