# Running and scheduling pipelines

Ylem’s pipelines can be triggered in 5 different ways:

### Manually on-demand

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2Ft5IkWGac685meH8Tj6tW%2FScreenshot%202024-04-30%20at%2014.58.09.png?alt=media&#x26;token=76dc527e-12f8-463c-8b52-8d525b32e5a0" alt=""><figcaption></figcaption></figure>

Both buttons to schedule or run the pipeline manually are located in the top right corner of the pipeline's canvas.

A manual trigger is typically used for:

* Testing and debugging new pipelines or pipelines that stopped working as expected
* Pipelines that don't have any periodical schedule, don't need to be triggered through the API but need to be run sometimes on demand when a user needs it

After clicking on the "**Run pipeline"** button a user gets an output that shows the status of every task or can open the full-text output log:

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2F9dHx7tx95yesOJG5lQhO%2FScreenshot%202024-04-30%20at%2015.05.16.png?alt=media&#x26;token=ed2868d5-5afe-49d2-8cb6-64c828742272" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FPG9OlrEcILyPf1omn7OM%2FScreenshot%202024-04-30%20at%2015.04.20.png?alt=media&#x26;token=347eac44-1ca5-476e-a07a-cc80c16f732c" alt=""><figcaption></figcaption></figure>

### Automatically by a schedule

Scheduling is the most common way of triggering pipelines that need to do a periodical job. For example, reporting, and data preparation.

It can be configured using either a visual interface or if you are familiar with a cronjob format, you can also use this one.

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2F7RMWCzCxO85C6ssiRD1e%2FScreenshot%202022-09-16%20at%2018.55.53.png?alt=media&#x26;token=b8f1c618-0f45-42a4-bc23-00821467e9e5" alt=""><figcaption></figcaption></figure>

### Automatically via API.

For example, by Apache Airflow, Jenkins, or any other software that is already used in your company for workflow or pipeline orchestration.

More information about triggering pipelines via API can be found in the [OAuth Clients](https://docs.ylem.co/api/oauth-clients) and [API Endpoints](https://docs.ylem.co/api/api-endpoints).

### In real-time from Apache Kafka, RabbitMQ, Google Pub/Sub, etc.

When placed as a first task in a pipeline, **external\_trigger** allows you to trigger the pipeline from your data streaming platforms to make it 100% real-time.

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FVq8804SbIbEsn20SvG7I%2FScreenshot%202022-11-28%20at%2018.09.50.png?alt=media&#x26;token=ac4bf1e9-7c3a-4713-abc6-6a5fc96a85fe" alt=""><figcaption></figcaption></figure>

More specific details can be found on the detailed pages for each integration:

* [Apache Kafka](https://docs.ylem.co/integrations/library-of-integrations/apache-kafka)
* [RabbitMQ](https://docs.ylem.co/integrations/library-of-integrations/rabbitmq)
* [Google Pub/Sub](https://docs.ylem.co/integrations/library-of-integrations/google-pub-sub)
* [AWS Lambda](https://docs.ylem.co/integrations/library-of-integrations/aws-lambda)

### From a metric when its value matches a condition

In each [metric](https://github.com/datamin-io/public-documentation/blob/main/pipelines/broken-reference/README.md), you can define which pipelines to execute depending on the value of your metric:

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FoYhQbT93m4Kn9vnjMYTO%2FScreenshot%202024-04-17%20at%2013.56.04.png?alt=media&#x26;token=c73b1ee2-7ef0-4939-9458-64bfb935b7f8" alt=""><figcaption></figcaption></figure>

Some of the more detailed examples of metrics can be found in the [list of our use cases](https://docs.ylem.co/use-cases/use-cases.-homepage). Our [library of templates](https://docs.ylem.co/pipelines/library-of-templates) also contains multiple ones, which you can use for configuring your metrics.
