The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Another Cron issue. Beefy UNIX for Dummies Questions & Answers 2 03-13-2008 09:30 AM
FTP Cron Issue edua Shell Programming and Scripting 7 11-26-2007 11:30 PM
Issue with cron job -Please help bsandeep_80 Shell Programming and Scripting 6 07-27-2007 11:20 AM
Issue with cron job nattynatty Shell Programming and Scripting 1 11-21-2005 03:37 PM
cron issue Optimus_P UNIX for Advanced & Expert Users 5 08-26-2002 10:30 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-09-2008
Registered User
 

Join Date: Jun 2006
Location: Las Vegas, NV
Posts: 103
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Cron issue

When I list whats in cron -l its fine but when I try to -e edit it...it returns a number 309 can't you not edit cron this way with solaris 10? I can do it fine in sol 8 and 9.

export EDITOR="vi" is set in my profile

I am using BASH

Code:
$ sudo crontab -l
Password:
#ident  "@(#)root       1.21    04/03/23 SMI"
#
# The root crontab should be used to perform accounting data collection.
#
#
10 3 * * * /usr/sbin/logadm
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
#10 3 * * * /usr/lib/krb5/kprop_script ___slave_kdcs___

$ sudo crontab -e
309

Last edited by kingdbag : 05-12-2008 at 01:10 PM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-11-2008
Registered User
 

Join Date: Nov 2006
Posts: 235
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
you never mentioned what shell you are using?

The command you typed only works for ksh

do an echo $SHELL and see what it says.

if you are using bourne shell then the command is in complete

the complete command to export EDITOR or export anything under bourne shell is ..

EDITOR=vi;export EDITOR
Reply With Quote
  #3 (permalink)  
Old 05-11-2008
Registered User
 

Join Date: Dec 2007
Location: Paris
Posts: 229
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Using sudo clear the EDITOR variable anyway.

309 is the number of characters in the crontab file as you are using the venerable default editor, ed.

Time to learn using ed or use a supported way to run privileged commands, as sudo is not part of Solaris 10.
Reply With Quote
  #4 (permalink)  
Old 05-11-2008
Registered User
 

Join Date: Mar 2008
Posts: 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
help on cron needed.

Hi folks, I am new into working on UNIX. I wanted to run a .sh script daily(say at 10 AM). I came to know about setting a cron job for this. I did go through the tutorial on how to add a cron job. This is what i did:

vi update.cron

MAILTO="myid@yahoo.com"
0 10 * * * somescript.sh >>/dev/null 2>&1

then saved the file.
then i did,

crontab update.cron.

question is :
1. will this work from any directory, which i'll be working in or i need to go to a specific directory?

2.when i execute crontab -l it does lists the added job but at the stipulated time the script/cron job does not run.Is there any other format or updation in any file that i should be doing.

Thanks a lot in advance
Reply With Quote
  #5 (permalink)  
Old 05-21-2008
Registered User
 

Join Date: May 2008
Location: s'pore
Posts: 183
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
don't find you way throug funny means. Just follow procedure bro!. cd /var/spool/cron/crontabs
ls
more OR vi root (to edit root cronjobs)
to allow/disallow norm user from executing/creating cron,
cd /etc/cron.d/
vi cron.deny (to include a/cs that is to be denied etc)
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 04:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102