LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 12-31-2006, 09:40 PM   #1
afbase
LQ Newbie
 
Registered: Jul 2006
Posts: 5

Rep: Reputation: 1
Crontab time


Hey I'm trying to have my crontab write an output of the time it takes to run a script
Code:
37 18 * * * time -o '/home/clinton/phplog.output' php /home/clinton/hdd1/coldowl/project/stock/tests/stock_class.php
for some reason my crontab wont except it. Is it my "-o '/home/clinton/phplog.output'"?
 
Old 12-31-2006, 09:56 PM   #2
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
Yeah.

Just drop the whole -o thing, and get output via email, as cron daemon will report you.
 
Old 12-31-2006, 10:04 PM   #3
afbase
LQ Newbie
 
Registered: Jul 2006
Posts: 5

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by kotnik
Yeah.

Just drop the whole -o thing, and get output via email, as cron daemon will report you.
how do you email the output???
 
Old 12-31-2006, 10:07 PM   #4
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
If you've added it to your user's crontab, you will get an email with any output command may generate.

Let's say I'm kotnik at my machine, and I added crontab which generates output, just like you. I'll get the output at kotnik@localhost. You do have MTA running around, don't you?
 
Old 12-31-2006, 10:13 PM   #5
afbase
LQ Newbie
 
Registered: Jul 2006
Posts: 5

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by kotnik
If you've added it to your user's crontab, you will get an email with any output command may generate.

Let's say I'm kotnik at my machine, and I added crontab which generates output, just like you. I'll get the output at kotnik@localhost. You do have MTA running around, don't you?

ahhh yes i have postfix i believe. i kinda just follow the steps on the howtoforge: perfect server installation of ubuntu (dapper).
 
Old 12-31-2006, 10:34 PM   #6
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 75
Another hint is to make sure you have the time program. Bash has its own internal “time” and I’m not sure cron (or bourne shell scripts) will use it. You might want to give the full path (i.e., “/usr/bin/time”) instead, just to be sure.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where does RH8 daily set system time to hardware clock time smartnorman Red Hat 1 05-24-2006 03:42 PM
crontab 24-hour time cleopard Linux - General 2 05-09-2006 08:24 AM
skip the crontab job for one time ust Linux - General 2 04-20-2005 04:01 AM
no signal when starting xorg for the 1st time (but the second time works fine) bungalowbill Linux - Software 0 06-04-2004 10:56 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM


All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration