# Running tasks in the console at regular intervals

**URL:** <https://forums.suse.com/t/running-tasks-in-the-console-at-regular-intervals/7414>\
**Category:** RancherOS\
**Created:** [September 26, 2017, 11:54am UTC](https://forums.suse.com/t/running-tasks-in-the-console-at-regular-intervals/7414 "2017-09-26T11:54:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![efrecon](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/efrecon/32/2860_2.png) [@efrecon](https://forums.suse.com/u/efrecon)\
**Post date:** [September 26, 2017, 11:54am UTC](https://forums.suse.com/t/running-tasks-in-the-console-at-regular-intervals/7414/1 "2017-09-26T11:54:13Z")

</div>

I am slowly discovering RancherOS, so far it all feels great. I am looking for ways to schedule tasks to execute within the console container from time to time. I have been looking into the [container-crontab](https://github.com/rancher/container-crontab), but this doesn’t seemed to be what I am looking for. I am looking to add something like the line below to some crontab that would then perform the work for me:

`* * * * * system-docker exec -it console date`

Has anyone succeeded in doing this?

---

<div class="post-metadata">

**Author:** ![efrecon](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/efrecon/32/2860_2.png) [@efrecon](https://forums.suse.com/u/efrecon)\
**Post date:** [October 5, 2017, 4:52pm UTC](https://forums.suse.com/t/running-tasks-in-the-console-at-regular-intervals/7414/2 "2017-10-05T16:52:59Z")

</div>

I managed to solve this one. It is basically a matter of running a new (system) container that implements cron, giving it away `/var/run/system-docker.sock`, and running `docker exec` from time to time. I am using my own [efrecon/dockron](https://hub.docker.com/r/efrecon/dockron/), but there are other options on the [hub](https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=cron&starCount=1)
