Sponsored Content
Full Discussion: Re-directing issue.
Top Forums Shell Programming and Scripting Re-directing issue. Post 302785203 by hanson44 on Monday 25th of March 2013 06:03:13 AM
Old 03-25-2013
Maybe the server was down when the cron job was supposed to run?

I would just say > /dev/null but it doesn't matter.

/var/log/syslog or similar logfile maybe with different name on different system should record what happens every time a cron job runs. Browse or grep that file.

You can crontab -e to make the job run sometime when you are around and you can monitor what happens.

You might as well direct the output to some log files so you'll never be in the dark:
Code:
> $HOME/mydir/cron-job-log.stdout 2> $HOME/mydir/cron-job-log.stderr

This User Gave Thanks to hanson44 For This Post:
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Locating files and directing ouput

I'm trying to locate all files that do not contain the string /usr but do contain the string csh within the file called /etc/passwd. Then I would like to direct this output to a file called pout. Does anyone one have suggestions on this one? Thanks (2 Replies)
Discussion started by: klannon
2 Replies

2. UNIX for Dummies Questions & Answers

directing output

How do I direct the output of an at command at now < backupprogram so that I see something happening. It says the job has been executed but I am not getting the tar file that my backup program on the computer anywhere at all Please help me - I really am a struggling begginer. (1 Reply)
Discussion started by: Cynergetix
1 Replies

3. UNIX for Advanced & Expert Users

Error re-directing

Hi, I'm running a program by executing the following command... convert NA 2> compiler.err Here is the command for debugging this process in IBM debugger... idebug convert NA 2> compiler.err On executing the above command the error output from idebug process is redirected to compiler.err,... (3 Replies)
Discussion started by: fermisoft
3 Replies

4. Programming

Regardign strtok() output directing to 2-D string array

Hi, I just wrote a program in C to split a comma seperated string in to group of strings using strtok() function. The code is: int main() { char *temp;//not used here but basically we extract one string after another using strtok() and assign to a string pointer defined like this. ... (3 Replies)
Discussion started by: SankarV
3 Replies

5. Shell Programming and Scripting

Directing program output to a file

When I do time tar cvf /dev/st0 /mnt/junk >> /root/benchlog, I want it to put the output of the time command into the benchlog file, but it put /mnt/junk. How do I get it to put the output of the tar command? (1 Reply)
Discussion started by: jeriryan87
1 Replies

6. Shell Programming and Scripting

directing output to multiple files

I have a script in which some outputs are directed to one file echo "Load Started" >>${LOGFILE1} If I have another file LOGFILE2 and i want to redirect the output of the above echo command to LOGFILE2 as well with the same command line... how can i do that? Thanks (2 Replies)
Discussion started by: cobroraj
2 Replies

7. Shell Programming and Scripting

Directing awk output to a folder

Dear All I have a simple bash script that creates a folder ( I called it TEMP) in the current directory. The question is: how do I direct the output of my awk script into folder TEMP? Below is my attempt: #!/bin/bash mkdir TEMP echo Enter input file: read infile awk... (4 Replies)
Discussion started by: Ghetz
4 Replies

8. Shell Programming and Scripting

Directing only part of a script's output to piped application

Is there a way to keep the output of a script displayed on the terminal when it's run by itself, but suspend part of that output and only have a specific part delivered when it's piped to another script or program? I'm thinking something like the following pseudocode: #!/bin/bash ... (1 Reply)
Discussion started by: trigg
1 Replies

9. UNIX Desktop Questions & Answers

Re-directing output

ps –xyz >/tmp/proc 2>&1 Can anyone explain what does '2' and '&1' will do here? Thanks to explain (1 Reply)
Discussion started by: kkalyan
1 Replies

10. Shell Programming and Scripting

Directing cat or grep command in variable

Hi, I still have the problem with directing information from cat or grep to a variable. For instance: XMSG "$(date +%Y_%m_%d)_error_report.txt" "$(cat "$(date +%Y_%m_%d)_error_report.txt")" &Works! The text received by cat is directed to my function. If it is written like this, my... (2 Replies)
Discussion started by: haukee
2 Replies
at(1)							      General Commands Manual							     at(1)

Name
       at, batch - execute commands at a later time

Syntax
       at time [day] [file]
       at -r job...
       at -l [job...]

       batch [file]

Description
       The  and commands use a copy of the named file (standard input default) as input to or at a later time.	A command to the current directory
       is inserted at the beginning, followed by assignments to all environment variables.  When the script is run, it uses the user and group	ID
       of the creator of the copy file.

       The command allows the user to specify when the commands should be executed, while jobs queued with execute when the load level of the sys-
       tem permits.

       The environment variables, current directory, and are retained when the commands are executed.  However, open files,  traps,  and  priority
       are lost.

       Users are permitted to use the and commands if their name appears in the file If that file does not exist, the file is checked to determine
       if the user should be denied access to and If neither file exists, only the superuser is allowed to submit a job.  If only the file  exists
       and is empty, global usage is permitted.  The files consist of one user name per line.

       The  time  is  1  to 4 digits.  It can, but does not have to be, followed by A, P, N or M which stand for AM, PM, noon or midnight, respec-
       tively. The A, P, N, and M suffixes are case-insensitive.  One and two digit numbers are interpreted as hours, three and four digits to	be
       hours  and  minutes. If three digits are specified, the first digit is interpreted to be an hour in the range 0-9, and the second and third
       digits as minutes.  If no letters follow the digits, a 24 hour clock time is presumed.

       In addition to 1-4 digits, and suffixes A, P, M, N, you can also specify:
       at hh:mm
       at h:mm
       at ham
       at hpm
       at noon
       at midnight

       The optional day is either a month name followed by a day number or by a day of the week.  If the word week  follows,  the  or  command	is
       invoked in seven days.  Both commands also recognize standard abbreviations for the days of the week and months of the year.  The following
       are examples of legitimate commands:
       at 8am jan 24

       at 1530 fr week

       The programs are executed by periodic execution of the command from The granularity of depends upon how often atrun is executed.  The  com-
       mand examines the file every minute.  The file determines when is executed.  The default is every 15 minutes on the 1/4 hour. Editing makes
       run more or less frequently.

       Standard output or error output is lost unless it is redirected.

       The and commands write the job number to standard error.

Options
       -r		   Removes jobs previously scheduled by or The number is the number reported at invocation by or  Only	the  superuser	is
			   allowed to remove another user's jobs.

       -l		   Lists all job numbers for all jobs submitted by the user issuing the command.  Even if the user is "root", only numbers
			   for jobs submitted by "root" are displayed.	To see the numbers of all jobs submitted, enter the following command:
			   % ls -l /usr/spool/at

Restrictions
       Due to the granularity of the execution of there may be bugs in scheduling jobs almost exactly 24 hours into the future.

Diagnostics
       Complains about various syntax errors and times that are out of range.

Files
       /usr/lib/atrun	   executor run by cron(8)

       in /usr/spool/at:
	    yy.ddd.hhhh.*  activity for year yy, day dd, hour hhhh.
	    lasttimedone   last hhhh
	    past	   activities in progress
       /usr/spool/at/at.allowlist of allowed users
       /usr/spool/at/at.denylist of denied users
       /usr/spool/at	   spool directory
       /usr/lib/cron	   XOPEN compatibility

See Also
       crontab(5), cron(8)

																	     at(1)
All times are GMT -4. The time now is 09:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy