'How to get schedules description in gitlab?

I have a scheduled pipeline in gitlab, whose description is "run everyday".

similar to this https://docs.gitlab.com/ee/ci/pipelines/schedules.html

How can I fetch this description when the pipeline runs? is there any CI variable which could give me the description?



Solution 1:[1]

It appears that there is no method to display the Description field from the scheduled pipeline in the list of pipelines that have run. I have searched and would really, really like that feature. Here is a link to an issues similar to your question being worked currently:
https://gitlab.com/gitlab-org/gitlab/-/issues/26621
https://gitlab.com/gitlab-org/gitlab/-/issues/241005

Solution 2:[2]

You could configure a variable within the schedule run.

Then use it within your gitlab-ci.yml file to achieve what you wanted. (Like pierres comment)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 quizguy