# CLI update single segment and run single campaign

**URL:** <https://forum.mautic.org/t/cli-update-single-segment-and-run-single-campaign/15021>\
**Category:** Product Support\
**Created:** [June 30, 2020, 6:45pm UTC](https://forum.mautic.org/t/cli-update-single-segment-and-run-single-campaign/15021 "2020-06-30T18:45:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonsmit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leonsmit/32/486_2.png) [@leonsmit](https://forum.mautic.org/u/leonsmit)\
**Post date:** [June 30, 2020, 6:45pm UTC](https://forum.mautic.org/t/cli-update-single-segment-and-run-single-campaign/15021/1 "2020-06-30T18:45:34Z")

</div>

Hi,

We have a specific use case where we want a single segment and a single connected campaign to run every 5 minutes but we want the other segments and campaigns to only run once every hour. We have quite a big instance so updating everything every 5 minutes is not going to work.

Is it possible to do this from the command line (and set a cron). I cant find from the documentation if there are any variables you can set on these commands that would support this.

I guess it would be something like:  
mautic:segments:update --id=123  
mautic:campaigns:update --id=456  
mautic:campaigns:trigger --id=456

Thanks!

---

<div class="post-metadata">

**Author:** ![leonsmit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leonsmit/32/486_2.png) [@leonsmit](https://forum.mautic.org/u/leonsmit)\
**Post date:** [July 1, 2020, 3:33pm UTC](https://forum.mautic.org/t/cli-update-single-segment-and-run-single-campaign/15021/2 "2020-07-01T15:33:35Z")

</div>

[Michael](https://app.slack.com/team/UGZU831UJ) [11 hours ago](https://mautic.slack.com/archives/C02GEN0SG/p1593579653096800?thread_ts=1593543490.095500&cid=C02GEN0SG)

this one drove me crazy for quite a while and i actually posted about it and never got an answer, i finally found out how mautic:segment:update -i 23  
So you add -i and segment number

This works and the same works for campaigns and emails.
