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 9115211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:22:37+00:00 2026-06-17T04:22:37+00:00

I am only an hour into learning how cron jobs work, and this is

  • 0

I am only an hour into learning how cron jobs work, and this is what I have done so far. I’m using crontab -e to add my cron command, which is:

0/1 * * * * /usr/bin/python /home/my_username/hello.py > /home/my_username/log.txt

crontab -l confirms that my command is there.

Hello.py:

#!/usr/bin/python
# Hello world python program
print "Hello World!"

But I don’t see anything in the log file. Can someone please explain what am I doing wrong?

  • 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-17T04:22:38+00:00Added an answer on June 17, 2026 at 4:22 am

    Experiment shows that the 0/1 seems to be the problem.

    0/1 should be equivalent to *. If you replace 0/1 with *, it should work.

    Here’s my experimental crontab:

    0/1 * * * * echo 0/1  >> cron0.log
    *   * * * * echo star >> cron1.log
    

    This creates cron1.log but not cron0.log.

    I’ll look into this and try to figure out why 0/1 isn’t working, but for now just use * and it should work.

    Update:

    The foo/bar syntax is specific to the Vixie cron implementation, which is used by most Linux systems and by MacOS X but is not universal.

    The usual way to run a command every minute is to specify just * in the first field. To run a command every 5 minutes, if your cron supports it, specify */5.

    Here’s what the crontab(5) man page says:

    Step values can be used in conjunction with ranges. Following a range
    with /<number> specifies skips of the number’s value through the
    range. For example, 0-23/2 can be used in the hours field to specify
    command execution every other hour (the alternative in the V7 standard
    is 0,2,4,6,8,10,12,14,16,18,20,22). Steps are also permitted after
    an asterisk, so if you want to say “every two hours”, just use */2.

    I’m not even sure what 0/1 means.

    UPDATE 2:

    Ok, here’s what I’ve found.

    Given that fields 2 through 5 are all *, setting the first field (specifying minutes) to * causes the job to run once a minute. */2 runs every 2 minutes, and */3 runs every 3 minutes. This is all as expected.

    Setting the first field to any of 0/1, 0/2, or 0/3 causes the job to run only at the top of the hour, i.e., it’s equivalent to just 0.

    This is not what I would have expected from the description in the man page. The Wikipedia quote in jgritty’s answer:

    Some versions of cron may not accept a value preceding “/” if it is
    not a range, such as “0”. An alternative would be replacing the zero
    with an asterisk.

    doesn’t seem to be entirely correct, at least for the version of Vixie cron I’m using; the 0/1 is accepted without complaint, but it doesn’t mean what I’d expect and it doesn’t seem particularly useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: I originally asked this question about an hour ago but only recently realized
I have a table in Oracle 10 that is defined like this: LOCATION HOUR
I have been searching the web for about an hour, however, I only seem
I am using this code to truncate datetime from my database into its year
I have been searching for an answer to this for about an hour and
Is there a way to update only Hour part in a DateTime field?? If
I am trying to create a JFormattedTextField that only accepts a 24-hour time. I
Only one instance of a ScriptManager can be added to the page. this error
Only editor can post into database but the price could'nt Post into database.. So,
Only began using Haskell a couple of weeks ago - I am attempting to

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.