# Need help with Inky Phat crontab update

**URL:** <https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207>\
**Category:** Support\
**Created:** [February 20, 2018, 7:57pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207 "2018-02-20T19:57:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![TIRI](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@TIRI](https://forums.pimoroni.com/u/TIRI)\
**Post date:** [February 20, 2018, 7:57pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/1 "2018-02-20T19:57:09Z")

</div>

I want to update the weather on my Inky Phat every 10 minutes.The directions to the Inky Phat say to enter, python weather.py, command after it is set up (which it does and works fine) and it says to add crontab -e  
and then I add,  
\*/10 \* \* \* \* python /home/pi/Pimoroni/inkyphat/examples/weather.py  
to that file that comes after that, but I must be doing something wrong as it never updates. Is there a code I can add to weather.py so it will update on its own? Or can someone tell me what I’m doing wrong.

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [February 21, 2018, 10:22am UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/2 "2018-02-21T10:22:16Z")

</div>

The file `weather.py` needs to load some images from the resources directory in /home/pi/Pimoroni/inkyphat/examples, so you need to write a little startup script for it that you call with Crontab:

Create your weather launcher:

```auto
cd ~
nano weather.sh

```

```auto
#!/bin/bash
cd /home/pi/Pimoroni/inkyphat/examples/
python weather.py

```

Ctrl+X, Y, Enter

Make it executable:

```auto
chmod +x weather.sh

```

Then your Crontab script should be changed to `/home/pi/weather.sh`

The `cd` part is crucial- it ensures that the working directory is changed so that `weather.py` can find the contents of `/home/pi/Pimoroni/inkyphat/examples/resources`

---

<div class="post-metadata">

**Author:** ![benedikt](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@benedikt](https://forums.pimoroni.com/u/benedikt)\
**Post date:** [March 5, 2018, 8:32pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/3 "2018-03-05T20:32:38Z")

</div>

I’m having the same issue/ question. Unfortunately, the workaround above doesn’t do the trick for me. What might I be doing wrong? And thanks!

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [March 6, 2018, 9:33am UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/4 "2018-03-06T09:33:41Z")

</div>

What code are you running, and which directory is it stored in?

---

<div class="post-metadata">

**Author:** ![benedikt](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@benedikt](https://forums.pimoroni.com/u/benedikt)\
**Post date:** [March 6, 2018, 1:15pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/5 "2018-03-06T13:15:21Z")

</div>

Hey, thanks for the reply! The crontab-code, you mean?

I pretty much opted for the above code in combination for a 10 mins refreshment rate as derived from the Inky Phat “Getting started” page. Also, I added a line to start up the weather app at every boot which so far is also failing. Here’s what I’ve entered into crontab -e:

@reboot python /home/pi/weather.sh

\*/10 \* \* \* \* python /home/pi/weather.sh

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [March 6, 2018, 1:53pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/6 "2018-03-06T13:53:16Z")

</div>

Note that “weather.sh” is a bash script, not a Python script. You shouldn’t need to call it with Python:

```auto
@reboot /home/pi/weather.sh

```

---

<div class="post-metadata">

**Author:** ![benedikt](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@benedikt](https://forums.pimoroni.com/u/benedikt)\
**Post date:** [March 6, 2018, 2:36pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/7 "2018-03-06T14:36:57Z")

</div>

Indeed, thank you for clearing that up. I removed the “python” and now it starts up like a charm… still no updates, though. Did I include any errors in the refreshment command line?

\*/10 \* \* \* \* python /home/pi/weather.sh

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [March 6, 2018, 2:45pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/8 "2018-03-06T14:45:19Z")

</div>

Yup- same issue, you need to drop `python` since it’s not a Python script.

---

<div class="post-metadata">

**Author:** ![benedikt](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@benedikt](https://forums.pimoroni.com/u/benedikt)\
**Post date:** [March 6, 2018, 3:10pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/9 "2018-03-06T15:10:49Z")

</div>

thank you so much for your patience with my novice-ness! this really does the trick now.

---

<div class="post-metadata">

**Author:** ![willipg](https://avatars.discourse-cdn.com/v4/letter/w/7c8e57/32.png) [@willipg](https://forums.pimoroni.com/u/willipg)\
**Post date:** [November 27, 2018, 8:00pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/10 "2018-11-27T20:00:59Z")

</div>

Thanks for that solution, I am no expert in Python and have been tearing what little hair I have out over the last couple of days trying to solve this.  
I include some detail of what i’m trying to achieve.  
Collect data from a BFE280 on a RasPi 3, send this over the LAN to PiZero W and the lovely little InkyPhat Black for display indoors. This is just a proof of concept and will move to my main home made Raspberry Pi weather station when it is proved to be reliable. I will probably adapt it to also display the temperature in my wood fired bread oven which has an embedded K type sensor and an Adafruit interface to another Pi (I have 6 assorted Pies running various jobs around the place)

Pete

---

<div class="post-metadata">

**Author:** ![indigoglyph](https://avatars.discourse-cdn.com/v4/letter/i/9fc29f/32.png) [@indigoglyph](https://forums.pimoroni.com/u/indigoglyph)\
**Post date:** [July 7, 2020, 6:18pm UTC](https://forums.pimoroni.com/t/need-help-with-inky-phat-crontab-update/7207/11 "2020-07-07T18:18:32Z")

</div>

As an afterthought, I had similar issues. Even after following all of Gadgetoid’s advice, I discovered one further step needed (possibly I mistyped something?)

Within the Crontab script, I had to add ‘bash’ before the path to the weather.sh script, so that it now reads:

\*/5 \* \* \* \* bash /home/pi/weather.sh

…after which it works perfectly.
