Sponsored Content
Full Discussion: how to save crontab
Top Forums Shell Programming and Scripting how to save crontab Post 65630 by Perderabo on Monday 7th of March 2005 03:48:28 PM
Old 03-07-2005
Quote:
Originally Posted by shahab03
hi..thanks a lot. i was able to make changes. however its not running. how do I find out if cron even executed?

my entry looks like this.

1 * * * * /u12/archive/rm_arch.sh

now this should execute every minute.. but its not doing anything. thanks a lot.
That should run once an hour. Change the 1 to an asterisk for every minute.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

save me!

Hi! can anyone tell me how to save a file from command line? Any help appreciated. (2 Replies)
Discussion started by: hufs375
2 Replies

2. Programming

cannot save file...

Hello! I have a problem: I compile some function, which must save file: ===================== // prog.cpp void save_file(){ FILE *fs = fopen("file.txt", "w"); if(!fs) cerr<< "cannot save"; fprintf(fs, "This is a text file."); fclose(fs) } ===================== If i compile it from... (8 Replies)
Discussion started by: szzz
8 Replies

3. Shell Programming and Scripting

save

hi i would like someone to assist me to find out how i can Write a script called save which copies a file into a special directory, and another called recover which copies a file back out of the special directory. The user of the script should not be aware of the location of the special directory... (2 Replies)
Discussion started by: swainaina
2 Replies

4. UNIX for Dummies Questions & Answers

Crontab refuses to save changes!

I'm trying to create a new crontab entry for a user on a debian box but whenever I do a crontab -e or crontab -u username -e then edit the crontab (with vim as my default editor) and :wq. I get the error message: no crontab for username - using an empty one crontab: no changes made to crontab... (18 Replies)
Discussion started by: fire>ant>
18 Replies

5. UNIX for Dummies Questions & Answers

can't save crontab with vi

I edit crontab with vi editor, i delete the lines i wanted, but i can't save! i tried the :w, :wq, ZZ commands and it seems like vi is unfamiliar with it. any suggestions? (3 Replies)
Discussion started by: idan_cn
3 Replies

6. Shell Programming and Scripting

Save cURL verbose output to file or do it like browser "save as.."

hi there ! i have exactly the same problem like this guy here https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html i am not able to save the curl verbose output.. the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
Discussion started by: crabmeat
0 Replies

7. Linux

How to save crontab configuration when using SSH?

Hi, I'm trying to save a crontab configuration using SSH, acessing a Linux machine from a Windows desktop. So, in the prompt I type "crontab -e", to edit crontab, and a window is opened. But after writing the changes, I press Save button but it seems not working, because when... (1 Reply)
Discussion started by: Roger75
1 Replies

8. Ubuntu

How to save crontab?

How to save crontab? I have try both method below but can't save it. FIRST METHOD error message hit 'escape' and then the following: :wq http://i.imgur.com/nY2YI.jpg SECOND METHOD error message ctrl + s http://i.imgur.com/ECzl0.jpg (3 Replies)
Discussion started by: mampwamp
3 Replies

9. UNIX for Dummies Questions & Answers

Auto load and save crontab

Hi all, I am trying to simplify things for two people who will be taking over my role whilst i go on leave. In doing so, i wanted to find a way that upon login to unix, the crontab would be reloaddd and resaved. I want to do this due to our IT dept taking the server down more often of late... (5 Replies)
Discussion started by: KlintJ
5 Replies

10. Shell Programming and Scripting

Save value from output of Corestat and save in a list for each core

I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below: Core Utilization CoreId %Usr %Sys %Total ------ ----- ----- ------ 5 4.91 0.01 4.92 6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies
crontab(5)							File Formats Manual							crontab(5)

Name
       crontab - clock daemon table file

Syntax
       /usr/lib/crontab

Description
       The  command  executes  at  specified dates and times according to the instructions in the file. The file consists of lines with six fields
       each.  The format for a line is as follows:

	      minute hour day month weekday command

       The following list defines each field in the line:

       minute (0-59)  The exact minute that the command sequence executes.

       hour (0-23)    The hour of the day that the command sequence executes.

       day (1-31)     The day of the month that the command sequence executes.

       month (1-12)   The month of the year that the command sequence executes.

       weekday (1-7)  The day of the week that the command sequence executes. Monday = 1, Tuesday = 2, and so forth.

       command	      The complete command sequence variable that is to be executed.  Note that the command string must conform  to  Bourne  shell
		      syntax.

       The first five integer fields may be specified as follows:

       o   A single number in the specified range

       o   Two numbers separated by a minus, meaning a range inclusive

       o   A list of numbers separated by commas, meaning any of the numbers

       o   An asterisk meaning all legal values

       The sixth field is a string that is executed by the shell at the specified times.  A percent sign (%) in this field is translated to a new-
       line character.	Only the first line of the command field, up to a percent sign (%) or end of line, is executed by the  shell.	The  other
       lines are made available to the command as standard input.

Examples
       The following example is part of a file:
       # periodic things
       0,15,30,45 * * * * (echo '^M' `date`; echo '') >/dev/console
       0,15,30,45 * * * * /usr/lib/atrun

       # daily stuff
       5 4 * * * sh /usr/adm/newsyslog
       15 4 * * * ( cd /usr/preserve; find . -mtime +7 -a -exec rm -f {} ; )
       20 4 * * * find /usr/msgs -mtime +21 -a ! -perm 444 -a ! -name bounds
	    -a -exec rm -f {} ;

       # NOTE: The above line is wrapped.

       # local cleanups
       30 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name df-exec rm {} ;
       35 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name tf-exec rm {} ;
       40 4 * * * find /usr/spool/rwho -type f -mtime +21 -exec rm {} ;
       #

       # redirecting error output
       0 17 * * 1,3,5 /bin/tar -cv /usr/sysads/smith > /dev/console 2>&1
       #

Files
See Also
       sh(1), cron(8)
       Guide to System Environment Setup

																	crontab(5)
All times are GMT -4. The time now is 02:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy