The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cronjobs not running. cromohawk SUN Solaris 1 09-15-2008 03:08 PM
Setting cronjobs... krworks Shell Programming and Scripting 4 06-06-2008 03:46 AM
Time Zone in AIX and cronjobs run_time_error AIX 1 04-28-2006 07:42 AM
Cronjobs mcastill66 AIX 1 05-31-2005 03:15 PM
cronjobs tamer UNIX for Dummies Questions & Answers 3 01-22-2001 02:48 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-17-2008
Geller Geller is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 19
Question Setting up cronjobs

hello all,

I have a shell script and I need to schedule it in crontab, I have the next line:

06 16 * * 1,2,3,4,5 /usr/bin/ksh /path/path/name.sh > /path/path/name.log

first, I scheduled from Monday to Friday but it doesn't run, the log file is empty.. any idea why is causing this?

note: my shell works if I run it manually.

Thanks!
  #2 (permalink)  
Old 11-17-2008
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669
is crond running?
  #3 (permalink)  
Old 11-17-2008
Geller Geller is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 19
could you explain me crond?, I am new on this and I haven't heard about crond, how can I check if crond is running? thank you
  #4 (permalink)  
Old 11-17-2008
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669
crond is the service that runs the cronjobs. If its not running your jobs wont run either.

What OS you using?

Post output of:
Code:
# ps aux | grep crond
  #5 (permalink)  
Old 11-17-2008
Geller Geller is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 19
SunOS 5.8 Generic_117350-35 sun4u sparc SUNW,Netra-T12


$ ps aux | grep crond
usage: ps [ -aAdeflcjLPy ] [ -o format ] [ -t termlist ]
[ -u userlist ] [ -U userlist ] [ -G grouplist ]
[ -p proclist ] [ -g pgrplist ] [ -s sidlist ]
'format' is one or more of:
user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid
pri opri pcpu pmem vsz rss osz nice class time etime stime
f s c lwp nlwp psr tty addr wchan fname comm args projid project
  #6 (permalink)  
Old 11-17-2008
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669
Ok, Im not sure of the command in SunOS.

you need to figure out how to the the ps command

This is what works on HP-UX:
Code:
# ps -ef | grep crond
But not sure if thats correct on SunOS
  #7 (permalink)  
Old 11-17-2008
Geller Geller is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 19
I tried the last command and I got this:

$ ps -ef | grep crond
user 19096 7926 0 17:44:58 pts/4 0:00 grep crond
Closed Thread

Bookmarks

Tags
shell script, shell scripting, unix scripting, unix scripting basics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

BB 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 -4. The time now is 01:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0