×
UNIX.COM Login
Username:
Password:  
Show Password






👤


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.

Crontab Issue

👤 Login to reply
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-30-2013
aravindj80 aravindj80 is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 26 February 2015, 1:55 AM EST
Posts: 44
Thanks: 3
Thanked 0 Times in 0 Posts
Crontab Issue

My colleague who was a sysadmin , has created a cron job script which collects logs and process them.

The script works perfectly as per the defined time set by him.

it works when we keep the timing as 55 05 * * * , whereas if we try to prepone the cron task is not getting executed.

Where could be the problem and how to change this.
Sponsored Links
    #2  
Old 05-30-2013
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 17 July 2018, 6:30 AM EDT
Location: San Jose, CA, USA
Posts: 11,407
Thanks: 649
Thanked 3,970 Times in 3,393 Posts
What is in the script? Does it contain anything that looks at the time when it is being run?

What entry are you making in crontab to prepone the task? Are you adding the new cron task to the same user's crontab that contained the working task?

Are you getting any error messages?
Sponsored Links
    #3  
Old 05-30-2013
aravindj80 aravindj80 is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 26 February 2015, 1:55 AM EST
Posts: 44
Thanks: 3
Thanked 0 Times in 0 Posts
it doesnt check any time stamp and we are not getting any error in the cron logs also.
    #4  
Old 05-30-2013
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 17 July 2018, 6:30 AM EDT
Location: San Jose, CA, USA
Posts: 11,407
Thanks: 649
Thanked 3,970 Times in 3,393 Posts
That answers two of my five questions. What about the other three?
Sponsored Links
    #5  
Old 05-30-2013
aravindj80 aravindj80 is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 26 February 2015, 1:55 AM EST
Posts: 44
Thanks: 3
Thanked 0 Times in 0 Posts
1. Changing it to 30 3 * * * /script

2. user credentials are same.

3. Script has collecting the logs and ftping the dump to another server.
Sponsored Links
    #6  
Old 05-30-2013
hicksd8 hicksd8 is offline Forum Staff  
Moderator
 
Join Date: Feb 2012
Last Activity: 17 July 2018, 2:33 PM EDT
Location: Devon, UK
Posts: 1,919
Thanks: 290
Thanked 513 Times in 432 Posts
What platform and operating system is this?

How are you changing the time of the cron job exactly?
Sponsored Links
    #7  
Old 05-30-2013
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 17 July 2018, 6:30 AM EDT
Location: San Jose, CA, USA
Posts: 11,407
Thanks: 649
Thanked 3,970 Times in 3,393 Posts
I'm surprised that you have an executable shell script in your root directory. Did you modify the contents of /script in any way?

Is there something else that runs between 3:30 and 5:55 in the morning that affects the logs your script collects or the dump it transfers?
Sponsored Links
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Crontab issue lovelysethii Shell Programming and Scripting 7 04-01-2013 12:14 PM
crontab issue mac4rfree Shell Programming and Scripting 2 06-30-2009 05:51 AM
crontab issue crackthehit007 UNIX for Advanced & Expert Users 4 03-22-2009 11:32 PM
crontab issue vaddi HP-UX 11 01-28-2008 05:07 AM
crontab issue Semper_Tempus Solaris 6 07-19-2005 10:13 PM



All times are GMT -4. The time now is 03:26 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.