Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have been using Linux systems for a number of years and have delt in many platforms including Ubuntu, Kubuntu ontop of that, Fedora and also some private based images.
Basically what it is yeah, i have some web hosting on a linux based Apache web server and have only recently started to look into using the crontab commands again (it has been a while since me using it when programming in Python).
The question i have is, i can set a cron off every hour and i will receive an e-mail about what has been executed etc. but what i wanted to know is, can i make the e-mail only be sent at midnight on the day? So the script runs 24 times in the day but i only get e-mailed from the Cron which runs at midnight.
The reason is, the web space that i rent only allows me to do one cron job and i am trying to find a way to execute it every hour but only send the e-mail for something once per day. Any solutions are great.
The Cron will be executing a cron.php file where part of this file will only execute at a certain time. I am familiar with PHP and the time functions if you think i could maybe do something with them to only send the e-mail out once a day. Just i am unsure how i can create a link in the cron.php file to e-mail out everything which is executed only at midnight.
Any suggestions are welcome...quite a puzzling question i thought for a first post from a new member lol. If this is in the wrong forum then can somebody move it please to the right section and any help is much appreciated as when doing a search on the net i have found nothing to help me with this.
Last edited by Sharkadder; 12-11-2012 at 05:47 PM.
the web space that i rent only allows me to do one cron job
per day ?? Seriously???
Personally I'd go elsewhere; that's ridiculous.
However, IF(!) I had to live with it I'd write a daemon to do the data gathering hourly and run the cron job once a day to send the email.
(Actually, rather than waste the cron job, I'd get the daemon to do the email as well)
Last edited by chrism01; 12-12-2012 at 05:30 PM.
I shall look into this, the cron i have can be executed multiple times per day but i only have access to the one cron job. i.e. multiple sends but i cannot figure a way to do the cron every hour but only send the e-mail which comes with it once per day. Do you know how i can maybe resolve this? Don't think my shared hosting has access to a Daemon which is a shame, restricted access and all that etc. :-(.
Last edited by Sharkadder; 12-12-2012 at 10:25 AM.
I could do your suggestion but when you do a cron command the e-mail runs from the actual command and not through any form of PHP script. That why i wondered if there was any specific parameter attached to cron.
My con job currently looks like this to let it e-mail once every day but don't know a command to make it go off every hour and only e-mail once per day: