how to save crontab


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 03-07-2005
Network how to save crontab

how does one save changes in crontab? i am using vi editor. Issued crontab -e command on the prompt. however not sure how to save changes. :wq doesnt work. any idea....
# 2  
Old 03-07-2005
If your EDITOR isn't set, then just type q to get back to the prompt. If EDITOR is vi, then hitting the escape key, :, wq should work.
# 3  
Old 03-07-2005
still doesnt work

I tried following
$ crontab -l
#00 20 * * * /u02/app/oracle/admin/PROD/scripts/db_bkup.ksh
#5,20,35,50 6-19 * * * /u02/app/oracle/admin/PROD/scripts/db_move_out_logs.ksh
#00 20 * * * /u02/app/oracle/admin/PROD2/scripts/db_bkup.ksh
#5,20,35,50 6-19 * * * /u02/app/oracle/admin/PROD2/scripts/db_move_out_logs.ksh

$ crontab -e
284
1 * * * * /u12/archive/rm_archive.sh
?
q
The crontab file was not changed.
$

EDITOR=vi doesnt help either. is it possible to locate the crontab file and write directly to it? thanks a lot
# 4  
Old 03-07-2005
You need to set your EDITOR variable.

If you are using sh or ksh
$ EDITOR=vi
$ export EDITOR
$ crontab -e

If you are using csh
% setenv EDITOR vi
% crontab -e

If you are using some other type of shell, please post which one (although one of those two suggestions should work for other shells).
# 5  
Old 03-07-2005
able to make changes

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.
# 6  
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.
# 7  
Old 03-07-2005
perfect

it runs.. how can change my entry to run every half hour?

new entry:


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


its interesting SUN's website shows first entry is for minutes. why it didnt work when I put 1 in the first place?

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

thanks
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Get a data and save sabercats UNIX for Dummies Questions & Answers 1 05-27-2015 04:57 PM
Save value from output of Corestat and save in a list for each core Zam_1234 Shell Programming and Scripting 0 03-18-2015 05:00 PM
Auto load and save crontab KlintJ UNIX for Dummies Questions & Answers 5 05-01-2013 03:58 AM
How to save crontab? mampwamp Ubuntu 3 11-11-2012 11:54 PM
How do I save a post? giannicello Post Here to Contact Site Administrators and Moderators 2 10-27-2011 02:56 PM
How to save crontab configuration when using SSH? Roger75 Linux 1 04-28-2010 11:11 AM
Save cURL verbose output to file or do it like browser "save as.." crabmeat Shell Programming and Scripting 0 01-23-2010 04:49 PM
Can't save a file suchismitasuchi UNIX for Advanced & Expert Users 5 07-05-2008 03:06 PM
can't save crontab with vi idan_cn UNIX for Dummies Questions & Answers 3 07-04-2008 04:44 AM
Crontab refuses to save changes! fire>ant> UNIX for Dummies Questions & Answers 18 04-25-2005 03:56 PM
save swainaina Shell Programming and Scripting 2 03-01-2005 06:07 PM
save a struct kall_ANSI Programming 2 10-29-2004 11:42 AM
how to save files? hiei UNIX for Dummies Questions & Answers 2 03-31-2004 11:08 PM
save me! hufs375 Shell Programming and Scripting 2 05-27-2002 09:03 AM