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 > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Crontab problem jess_t03 AIX 3 05-22-2009 01:42 AM
problem with crontab cleansing_flame UNIX for Dummies Questions & Answers 1 01-29-2008 08:02 PM
Problem with crontab cleansing_flame UNIX for Dummies Questions & Answers 3 01-14-2008 04:03 PM
Run crontab job problem ust UNIX for Advanced & Expert Users 3 07-23-2007 09:45 PM
Problem with Crontab Zak UNIX for Dummies Questions & Answers 2 12-20-2005 05:44 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-09-2005
DebianJ DebianJ is offline
Registered User
  
 

Join Date: May 2005
Posts: 52
crontab problem

hi..

i have a program (tf.sh), and i want what it runs automatically with a "lapsus" of 2 hours. (1,3,5,7,9,11,13,15,17,19,21,23 hrs.)

i know what i have to do it using crontab, but i donīt know how to do it.

i have the next idea, but the problem is what it doesnīt run on my server (solaris 5.7):

0 1,3,5,7,9,11,13,15,17,19,21,23 * * * /sybase/TRANSFERENCIA_FTP/tf.sh 2>/tmp/.ftp.log.2 1>/tmp/.ftp.log.1

please help me - any idea
thanks
jona
  #2 (permalink)  
Old 05-09-2005
dangral dangral is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2002
Posts: 699
You need one more asterisk in there.

From the crontab man page:


Quote:
The entries in a crontab file are lines of six fields each. The
fields are separated by spaces or tabs. The lines have the following
format:

minute hour monthday month weekday command

The first five are integer patterns that specify when the sixth field,
command, should be executed. They can have the following ranges of
values:
  #3 (permalink)  
Old 05-10-2005
DebianJ DebianJ is offline
Registered User
  
 

Join Date: May 2005
Posts: 52
why another asterisk

why do you said that i need another asterisk?

please, explain me ... i donīt know how to use crontab

thanks
  #4 (permalink)  
Old 05-10-2005
dangral dangral is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2002
Posts: 699
My mistake, you don't need another asterisk. At first glace it seemed like you were missing a field.

Do you get any output into the files /tmp/.ftp.log.1 and /tmp/.ftp.log.2? Can you check if there are error messages in the cron log?

Is cron running? Type ps -ef | grep cron and post the output.
  #5 (permalink)  
Old 05-10-2005
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
dangral was mistaken - he missed the leading 0 - you might want to put in
00 instead so others won't mistake it.

00 1,3,5,7,9,11,13,15,17,19,21,23 * * * /sybase/TRANSFERENCIA_FTP/tf.sh 2>/tmp/.ftp.log.2 1>/tmp/.ftp.log.1

instead of

0 1,3,5,7,9,11,13,15,17,19,21,23 * * * /sybase/TRANSFERENCIA_FTP/tf.sh 2>/tmp/.ftp.log.2 1>/tmp/.ftp.log.1


And I assume since this is started from /sybase, you require some of the env variables associated with Sybase. If you can run it from the command line and it works, then do the env command to find any sybase variables that will need to be set up in the tf.sh script to get it to work.
  #6 (permalink)  
Old 05-10-2005
DebianJ DebianJ is offline
Registered User
  
 

Join Date: May 2005
Posts: 52
crontab problem

i don`t get any output into the files /tmp/.ftp.log.1 and /tmp/.ftp.log.2
is more, they donīt exist in the /temp folder

i put the command and this is the exit:
data:sybase>ps -e|grep cron

10564 pts/7 S 0:00 grep cron _=/usr/bin/grep ASTMP=/sybase/CATALOGO _INIT_

what does this mean? how can i do it again this crontab?
  #7 (permalink)  
Old 05-10-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
DebianJ, you are using /usr/ucb/ps. You need to use /usr/bin/ps to do what RTM asked.
Closed Thread

Bookmarks

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 02:49 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