Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8751895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:07:55+00:00 2026-06-13T13:07:55+00:00

I can’t seem to run a simple bash file as a cron job that

  • 0

I can’t seem to run a simple bash file as a cron job that runs once a minute.

#!/bin/bash 

NET_INTERFACE=eth0

CURRENT_IP=`/sbin/ifconfig $NET_INTERFACE | sed -n "/inet addr:.*255.255.25[0-5].[0-9]/{s/.*inet addr://; s/ .*//; p}"`

wget -q --delete-after "http://abc.co.uk/raspiUpdate.php?pi=1&ip=${CURRENT_IP}"

In the crontab I have:

 *     *     *     *     *        /home/user/Scripts/script.sh

Where am I going wrong?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:07:57+00:00Added an answer on June 13, 2026 at 1:07 pm

    To troubleshoot this cron issue a few steps come to mind:

    1. double-check the scripts file name you put in your crontab:

      $ ls -lah  /home/user/Scripts/script.sh
      $ cat /home/user/Scripts/script.sh
      
    2. check that that script is executable by the user the crontab is installed for. i.e. if you use /etc/crontab, it should be executable by root, if you used

      $ crontab -e
      

      it should be executable by your userid.

      Actually running that script should already give you a hint.

    3. look for hints provided by cron. Depending on what distribution you run, the file cron logs to is different. For debian it should be /var/log/syslog IIRC

    If you can’t find an error message anywhere, it’s hard to tell what’s wrong. Generally if I reach that point, I stop and go to sleep or do something else.

    [edit]
    And when I return, i often find the error. 🙂

    p.s.:

    1. i recently had problems with dots in the filename. Some cron implementations ignore files in /etc/cron.* with dots in their filename. Documented here: http://manpages.ubuntu.com/manpages/xenial/en/man8/cron.8.html as Debian specific. But I think I had this issue also on Fedora.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can't seem to figure out what's wrong with the simple getJSON call below. It's
Can a LINQ enabled app run on a machine that only has the .NET
I have just tried to save a simple *.rtf file with some websites and
Can I run this in a Windows command prompt like I can run it
Can someone guide me on a possible solution? I don't want to use /bin/cp
Can we change the color of the divider? Apple documentations says, that we can
Can any one tell me clearly why ? Reading is simple in ArrayList,( we
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Can anyone tell me how to open Auto CAD file in HTML5? Is this
Can any one help me in sorting this out in sed/awk/perl Input file Start

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.