Sponsored Content
Full Discussion: crontab
Top Forums UNIX for Advanced & Expert Users crontab Post 16130 by AtleRamsli on Tuesday 26th of February 2002 05:25:39 AM
Old 02-26-2002
If you want to know if you can access the terminals that you don't 'see' - on Linux, you have 7 bu default, on BSD 9 - shift with ALT-F1.

These are called tty1-7, and you can cat to them.
You may run into permission problems, though.

Maybe you really want to write to a log file, and then open up a terminal and monitor that logfile?

open a terminal, either xterm or Alt[Fx]

then write:
$cat >/var/log/krishna
Hey, this works


open another, then write

$tail -f /var/log/krishna

and sheck the output.
Write some more stuff into the file from the first terminal, and check the output in the second.

this is more fun with xterms ...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

crontab

Hi I have a shell script which works fine at the command line and does works in crontab also but does not send the output to mail as other scripts do by default. 10 1 * * * /export/home/test/report_script by default should send the output to mail but the script runs OK and the output... (1 Reply)
Discussion started by: run_time_error
1 Replies

2. UNIX for Dummies Questions & Answers

about crontab

dear all , does any one now how can i become sure that the crontab that i put was working successfully not by looking for thr result of the sheduled task but from a log for the crontab or something similar and i need to check that the cron i wrote is correct 00 15 * * 0,1,2,3,6... (2 Replies)
Discussion started by: habuzahra
2 Replies

3. UNIX for Dummies Questions & Answers

Crontab

How can I run "crontab" (parameters) every 6 hours on solaris machine? Thanks (1 Reply)
Discussion started by: gen4ik
1 Replies

4. Shell Programming and Scripting

help with crontab

i have a ksh script that creates messages in a temp directory and then sends them out using the sendmail command and i'm trying to set it up to run every night with crontab. So the basic gist of the script is #create temp dir and messages ... #loop through each message and send using sendmail... (3 Replies)
Discussion started by: bob122480
3 Replies

5. UNIX for Dummies Questions & Answers

crontab

hi all how to schedule the crontab file in unix? (2 Replies)
Discussion started by: ss4u
2 Replies

6. Shell Programming and Scripting

Using Crontab

Hi All, I've a shell script which calls a Sybase stored procedure to do some functionality. I want to schedule the running of this script by crontab. I'm using Solaris 5.8. When i executed the following command crontab -l i got the output as crontab: can't open your crontab file How... (10 Replies)
Discussion started by: sumesh.abraham
10 Replies

7. UNIX for Advanced & Expert Users

Crontab help

hi, I run a .sh file using crontab. I need to know the path of the file . Previously when I run the file alone , i used "pwd" but now when using crontab it gives the temp directory of the file. Is there any way I can find the absolute path of the file when i execute it ? Regards, Ranga (7 Replies)
Discussion started by: r_W213
7 Replies

8. UNIX for Advanced & Expert Users

Help regarding crontab

Dear All jobs are scheduled in crontab . To view this I use crontab -l . But suddenly today I am not able to see any jobs that is being scheduled in crontab. when I type crontab -l , I am seeing nothing.I am not logging through admin user(i dont have it).But I can schedule jobs through... (3 Replies)
Discussion started by: tkbharani
3 Replies

9. Shell Programming and Scripting

crontab

I have a crontab entry,but it is not working. Can anybody help me in this regard?? (2 Replies)
Discussion started by: Sourav_Paul
2 Replies

10. UNIX for Dummies Questions & Answers

at vs crontab

Hi, can someone explain the differences between using the at and crontab commands. When would you use one command over the other? TIA Dom (1 Reply)
Discussion started by: domburf69
1 Replies
Log::Handler::Output::File(3pm) 			User Contributed Perl Documentation			   Log::Handler::Output::File(3pm)

NAME
Log::Handler::Output::File - Log messages to a file. SYNOPSIS
use Log::Handler::Output::File; my $log = Log::Handler::Output::File->new( filename => "file.log", filelock => 1, fileopen => 1, reopen => 1, mode => "append", autoflush => 1, permissions => "0664", utf8 => 0, ); $log->log(message => $message); DESCRIPTION
Log messages to a file. METHODS
new() Call "new()" to create a new Log::Handler::Output::File object. The following options are possible: filename With "filename" you can set a file name as a string or as a array reference. If you set a array reference then the parts will be concat with "catfile" from "File::Spec". Set a file name: my $log = Log::Handler::Output::File->new( filename => "file.log" ); Set a array reference: my $log = Log::Handler::Output::File->new( # foo/bar/baz.log filename => [ "foo", "bar", "baz.log" ], # /foo/bar/baz.log filename => [ "", "foo", "bar", "baz.log" ], ); filelock Maybe it's desirable to lock the log file by each write operation because a lot of processes write at the same time to the log file. You can set the option "filelock" to 0 or 1. 0 - no file lock 1 - exclusive lock (LOCK_EX) and unlock (LOCK_UN) by each write operation (default) fileopen Open a log file transient or permanent. 0 - open and close the logfile by each write operation 1 - open the logfile if C<new()> called and try to reopen the file if C<reopen> is set to 1 and the inode of the file has changed (default) reopen This option works only if option "fileopen" is set to 1. 0 - deactivated 1 - try to reopen the log file if the inode changed (default) How to use fileopen and reopen Please note that it's better to set "reopen" and "fileopen" to 0 on Windows because Windows unfortunately haven't the faintest idea of inodes. To write your code independent you should control it: my $os_is_win = $^O =~ /win/i ? 0 : 1; my $log = Log::Handler::Output::File->new( filename => "file.log", mode => "append", fileopen => $os_is_win ); If you set "fileopen" to 0 then it implies that "reopen" has no importance. mode There are three possible modes to open a log file. append - O_WRONLY | O_APPEND | O_CREAT (default) excl - O_WRONLY | O_EXCL | O_CREAT trunc - O_WRONLY | O_TRUNC | O_CREAT "append" would open the log file in any case and appends the messages at the end of the log file. "excl" would fail by open the log file if the log file already exists. "trunc" would truncate the complete log file if it exists. Please take care to use this option. Take a look to the documentation of "sysopen()" to get more information. autoflush 0 - autoflush off 1 - autoflush on (default) permissions The option "permissions" sets the permission of the file if it creates and must be set as a octal value. The permission need to be in octal and are modified by your process's current "umask". That means that you have to use the unix style permissions such as "chmod". 0640 is the default permission for this option. That means that the owner got read and write permissions and users in the same group got only read permissions. All other users got no access. Take a look to the documentation of "sysopen()" to get more information. utf8 If this option is set to 1 then UTF-8 will be set with "binmode()" on the output filehandle. log() Call "log()" if you want to log messages to the log file. Example: $log->log(message => "this message goes to the logfile"); flush() Call "flush()" if you want to re-open the log file. This is useful if you don't want to use option "reopen". As example if a rotate mechanism moves the logfile and you want to re-open a new one. validate() Validate a configuration. reload() Reload with a new configuration. errstr() Call "errstr()" to get the last error message. close() Call "close()" to close the log file yourself - normally you don't need to use it, because the log file will be opened and closed automatically. PREREQUISITES
Carp Fcntl File::Spec Params::Validate EXPORTS
No exports. REPORT BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>. If you send me a mail then add Log::Handler into the subject. AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>. COPYRIGHT
Copyright (C) 2007-2009 by Jonny Schulz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-11-21 Log::Handler::Output::File(3pm)
All times are GMT -4. The time now is 06:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy