# Basic Crontab setup

**URL:** <https://community.f5.com/t/basic-crontab-setup/13311>\
**Category:** Technical Forums\
**Tags:** config, management, configuration, config-sync\
**Created:** [August 13, 2013, 4:44pm UTC](https://community.f5.com/t/basic-crontab-setup/13311 "2013-08-13T16:44:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![crosson\_16669](https://avatars.discourse-cdn.com/v4/letter/c/b5e925/32.png) [@crosson\_16669](https://community.f5.com/u/crosson_16669)\
**Post date:** [August 13, 2013, 4:44pm UTC](https://community.f5.com/t/basic-crontab-setup/13311/1 "2013-08-13T16:44:43Z")

</div>

I can’t seem to get my bigip to run a simple cron. Below is the script run

config\_sync\_script.py

```tcl
!/usr/bin/python
import os

failover_status = os.popen("b failover show").read().split()[1]
sync_status = os.popen('tmsh show sys config-sync | grep "Status"').read().split()[1]

if failover_status == 'active' and sync_status == '1':
        os.system('tmsh run sys config-sync')

```

```tcl
config ls -la | grep config_sync_script.py

    -rwxr--r-- 1 root root 274 Aug 13 09:06 config_sync_script.py

```

```tcl
crontab -l
    Active] config crontab -l
     cron tab for root
    1-59/30 * * * * /usr/bin/diskmonitor
    18 9 * * * /config/config_sync_script.py

```

The time just matches a time I was working on it. In monitoring the cron log nothing happens and the script never seems to run. What am I missing?

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [August 13, 2013, 5:05pm UTC](https://community.f5.com/t/basic-crontab-setup/13311/2 "2013-08-13T17:05:37Z")

</div>

You might go with **tmsh show sys failover** instead of **b failover show** to future proof that script, b commands are gone in 11.x. Also in 11.x, the second command is **tmsh show cm sync-status**.

For now, could you try something like:

18 9 \* \* \* root /usr/bin/python /config/config\_sync\_script.py 1\>/var/tmp/configsync.log 2\>&1

---

<div class="post-metadata">

**Author:** ![crosson\_16669](https://avatars.discourse-cdn.com/v4/letter/c/b5e925/32.png) [@crosson\_16669](https://community.f5.com/u/crosson_16669)\
**Post date:** [August 13, 2013, 5:10pm UTC](https://community.f5.com/t/basic-crontab-setup/13311/3 "2013-08-13T17:10:32Z")

</div>

I agree but I’m stuck on 10.2.4 so the B command is all I have for now.

Good call on outputting to a logfile. I’ll give it a shot and let you know. Thanks Jason!

---

<div class="post-metadata">

**Author:** ![crosson\_16669](https://avatars.discourse-cdn.com/v4/letter/c/b5e925/32.png) [@crosson\_16669](https://community.f5.com/u/crosson_16669)\
**Post date:** [August 13, 2013, 5:58pm UTC](https://community.f5.com/t/basic-crontab-setup/13311/4 "2013-08-13T17:58:46Z")

</div>

Found the issue. Piping the out to a file helped.

> **[404 Page not found | BIG-IP Documentation](https://techdocs.f5.com/kb/en-us/solutions/public/11000/600/sol11635)**
>
> Usage information and technical documentation for BIG-IP and other related F5 products
