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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:19:45+00:00 2026-05-23T12:19:45+00:00

I have an .exe setup to run every 5 minutes.It creates a file. I

  • 0

I have an .exe setup to run every 5 minutes.It creates a file.

I have stored the users email in a mysql database. The file that get created is named after the primary key of the database.For example:

1.txt,2.txt,50.txt etc

Where 1,2,and 50 are the primary keys.

I was wondering if there was a way after the cron ran to email the users.I use php on my server.Is there some way to do this?

EDIT:
I think I can rather just set up a .php file to run on cron and use exec().

  • 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-23T12:19:46+00:00Added an answer on May 23, 2026 at 12:19 pm

    In your crontab, you can have cron entries and you can have environment variables. There is a variable called MAILTO that specifies the user that will receive the email containing any stdout or stderr from the processed jobs.
    To send email to vivek@nixcraft.in, enter:

    MAILTO=vivek@nixcraft.in
    

    If MAILTO is defined but empty (MAILTO=””), no mail will be sent.

    MAILTO=""
    

    The default (if MAILTO is not set) is to email the local user who owns the crontab being executed.

    I haven’t tried it, but you may be able to set the email for just one of your cronjobs using something like this:

    0 0 * * * /root/daily_task.sh #will email crontab owner
    MAILTO=joe@gmail.com
    0 1 * * * /root/other_daily_task.sh # will email joe@gmail
    MAILTO=root
    0 * * * * /root/hourly_task.sh #(hopefully) mails root and not joe
    

    Anything after a # on a line is of course a comment.

    Taken from http://www.cyberciti.biz/faq/linux-unix-crontab-change-mailto-settings/

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

Sidebar

Related Questions

I have a perl .exe file that I was to run every ten minutes.
I have a setup.exe project that I run with the following command-line arguments to
I have an exe that already creates a csv file. If I save the
I have this installation file setup.exe that was created with installShield wizard. as part
I have a setup project in c#. i want that setup run 2 exe
I have an exe that is built and placed into a Setup project for
We have customers who are trying to download a setup.exe file over mobile connections
We are installing out program via inno setup. We have one main exe file,
I have an Setup project that installs App.exe. App.exe depends on 1) A third
I have added an external .exe file into my VS2010 setup project and I'd

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.