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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:08:29+00:00 2026-05-18T22:08:29+00:00

‘ve been puzzling over cronjobs for the last few hours. I’ve read documentation and

  • 0

‘ve been puzzling over cronjobs for the last few hours. I’ve read documentation and examples. I understand the basics and concepts, but haven’t gotten anything to work. So I would appreciate some help with this total noob dilemma.

The ultimate goal is to schedule the execution of a django function every day. Before I get that far, I want to know that I can schedule any old script to run, first once, then on a regular basis.

So I want to:
1) Write a simple script (perhaps a bash script) that will allow me to determine that yes, it did indeed run successfully, or that it failed.
2) schedule this script to run at the top of the hour

I tried writing a bash script that simple output some text to the terminal:

#!/bin/bash
echo "The script ran"

Then I dropped this into a .txt file

MAILTO = *****.******@gmail.com
05 * * * * /home/vadmin/development/test.sh

But nothing happened. I’m sure I did many things wrong. Where do I start to fix all of this?

  • 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-05-18T22:08:29+00:00Added an answer on May 18, 2026 at 10:08 pm

    Crontab does not send emails by itself, and defining MAILTO variable doesn’t change its mind. You need to do something like this:

    First, make sure that mail -s ADDRESS is actually of sending email from your box.
    Then invoke crontab -e to edit crontab file. Put something like this:

    SHELL=/bin/bash
    MAILTO=dude@gmail.com
    BASH_ENV=/home/dude/.bash_profile
    05 * * * Mon-Fri echo "Hello from Cron script" | mail -s "My Script Output" "${MAILTO}"
    

    Save the file and close editor, cron should pick up changes. This should work and you should get email. Then you can replace echo "Hello from Cron script" with your script.

    Hope it helps. Good luck!

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I would like to run a str_replace or preg_replace which looks for certain words
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to create a RegEx expression that will successfully parse the following
This is how I get the tags of a body of text. var tags
I'm running a Octopress blog which is based on Jekyll . Now I wanted
I'm creating a web service to transfer json to an iPhone app. I'm using

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.