Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Using cron jobs with cPanel
Old 09-20-2008, 07:45 AM Question Using cron jobs with cPanel
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
In the cron job cPanel "Standard" interface there is this:

"Standard Cron Manager This is a web interface to the crontab program. It allows you to run commands at any time you specify. Enter the command you would like to run as well as running times.
Please enter an email address where the cron output will be sent:
[ MySite ]

NOTE: You will receive a message every time this job runs. Using your main e-mail address is not recommended.
Your cron MUST produce an output or you will not receive an email.
Entry 1 Command to run:
[ ] "

Now my question is this: What exactly is an "output"?
For example if the PHP file I tell the crontab to run simply echos results, is THAT "output"? Does it need to be formatted into HTML tags? What if the file that I run generates an automated mail message of its own? I`m a bit confused.

Never used cron jobs before but I`d like to create one that sends me a report at the end of each day telling me what records (if any) users have added to a database.
TWD is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-22-2008, 05:47 PM Re: Using cron jobs with cPanel
L a r r y's Avatar
Super Talker

Posts: 100
Name: Larry K
Location: Arizona
Trades: 0
What is an output:
You run a command in a Windows command line window, such as dir, which prints output on the screen containing the contents of the current directory (folder). This directory listing is the output that will appear in your email.

In Linux, you open the Terminal and enter a command on the command line. I just used the dir command. It listed all of the files and folders in my home directory. If you set a cron job to run the dir command every day at 5 PM, then you will get a daily email listing all of the files and folders in the current or specified directory. If a command runs but does not print information on the screen locally, it does not send you an email if it is set to run as a cron job.
L a r r y is offline
Reply With Quote
View Public Profile Visit L a r r y's homepage!
 
Old 09-23-2008, 07:40 AM Re: Using cron jobs with cPanel
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
Quote:
Originally Posted by L a r r y View Post
If a command runs but does not print information on the screen locally, it does not send you an email if it is set to run as a cron job.
So from this can I assume that if my php file consists of this:

<?php echo "Hello world" \n "Hello world again"; ?>

I would get the following in my cron job email report:

Hello world
Hello world again



??
TWD is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Using cron jobs with cPanel
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27330 seconds with 12 queries