# Help with Crontab and Scripts

**URL:** <https://community.unix.com/t/help-with-crontab-and-scripts/308276>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [April 12, 2012, 5:08pm UTC](https://community.unix.com/t/help-with-crontab-and-scripts/308276 "2012-04-12T17:08:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbowers](https://community.unix.com/letter_avatar/bbowers/32/6_449c533f586939b6e5f246632a46421f.png) [@bbowers](https://community.unix.com/u/bbowers)\
**Post date:** [April 12, 2012, 5:08pm UTC](https://community.unix.com/t/help-with-crontab-and-scripts/308276/1 "2012-04-12T17:08:53Z")

</div>

I'm trying to create a crontab that runs every hour and runs a script in my $HOME/bin directory.  
Everytime it goes to run it I get this mail.

```nohighlight
Message 14:
From root@xx.xxxx.edu Thu Apr 12 14:03:01 2012
Return-Path: <root@xx.xxxx.edu>
X-Original-To: bbowers
Delivered-To: bbowers@xx.xxxx.edu
From: root@xx.xxxx.edu (Cron Daemon)
To: bbowers@xx.xxxx.edu
Subject: Cron <bbowers@xx> $HOME/bin/helloworld.sh
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/IT-43AR-M3306/bbowers>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=bbowers>
X-Cron-Env: <USER=bbowers>
Date: Thu, 12 Apr 2012 14:03:01 -0700 (PDT)
Status: R

/bin/sh: /home/IT-43AR-M3306/bbowers/bin/helloworld.sh: No such file or directory

&

```

What does this mean? And how come it isn't working?

This is my crontab:

```nohighlight
30 * * * * $HOME/bin/helloworld

```

This is my script:  
#!/bin/bash  
echo Hello World

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Corona688](https://community.unix.com/letter_avatar/corona688/32/6_449c533f586939b6e5f246632a46421f.png) [@Corona688](https://community.unix.com/u/Corona688)\
**Post date:** [April 12, 2012, 5:42pm UTC](https://community.unix.com/t/help-with-crontab-and-scripts/308276/2 "2012-04-12T17:42:36Z")

</div>

You forgot the sh:

```nohighlight
30 * * * * $HOME/bin/helloworld.sh

```

---

<div class="post-metadata">

**Author:** ![bbowers](https://community.unix.com/letter_avatar/bbowers/32/6_449c533f586939b6e5f246632a46421f.png) [@bbowers](https://community.unix.com/u/bbowers)\
**Post date:** [April 12, 2012, 5:45pm UTC](https://community.unix.com/t/help-with-crontab-and-scripts/308276/3 "2012-04-12T17:45:30Z")

</div>

in my post. I do have the .sh  
Sorry, my mistake

---

<div class="post-metadata">

**Author:** ![radoulov](https://community.unix.com/user_avatar/community.unix.com/radoulov/32/489_2.png) [@radoulov](https://community.unix.com/u/radoulov)\
**Post date:** [April 12, 2012, 5:56pm UTC](https://community.unix.com/t/help-with-crontab-and-scripts/308276/4 "2012-04-12T17:56:11Z")

</div>

Try using the full path to your script instead of the value of HOME.

---

<div class="post-metadata">

**Author:** ![methyl](https://community.unix.com/letter_avatar/methyl/32/6_449c533f586939b6e5f246632a46421f.png) [@methyl](https://community.unix.com/u/methyl)\
**Post date:** [April 13, 2012, 6:35am UTC](https://community.unix.com/t/help-with-crontab-and-scripts/308276/5 "2012-04-13T06:35:15Z")

</div>

If the above didn't fix it, please post the output from the following two directory lists:

```nohighlight
ls -lad /home/IT-43AR-M3306/bbowers/bin
ls -lad /home/IT-43AR-M3306/bbowers/bin/helloworld.sh

```
