Unix/Linux Go Back    


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

UNIX for Advanced & Expert Users


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-30-2013   -   Original Discussion by aravindj80
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 Unix and Linux 05-30-2013   -   Original Discussion by aravindj80
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 23 November 2017, 6:19 PM EST
Location: San Jose, CA, USA
Posts: 10,680
Thanks: 575
Thanked 3,738 Times in 3,190 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 Unix and Linux 05-30-2013   -   Original Discussion by aravindj80
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 Unix and Linux 05-30-2013   -   Original Discussion by aravindj80
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 23 November 2017, 6:19 PM EST
Location: San Jose, CA, USA
Posts: 10,680
Thanks: 575
Thanked 3,738 Times in 3,190 Posts
That answers two of my five questions. What about the other three?
Sponsored Links
    #5  
Old Unix and Linux 05-30-2013   -   Original Discussion by aravindj80
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 Unix and Linux 05-30-2013   -   Original Discussion by aravindj80
hicksd8 hicksd8 is offline Forum Staff  
Moderator
 
Join Date: Feb 2012
Last Activity: 23 November 2017, 2:11 PM EST
Location: Devon, UK
Posts: 1,607
Thanks: 232
Thanked 399 Times in 337 Posts
What platform and operating system is this?

How are you changing the time of the cron job exactly?
Sponsored Links
    #7  
Old Unix and Linux 05-30-2013   -   Original Discussion by aravindj80
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 23 November 2017, 6:19 PM EST
Location: San Jose, CA, USA
Posts: 10,680
Thanks: 575
Thanked 3,738 Times in 3,190 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
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 01:14 PM
crontab issue mac4rfree Shell Programming and Scripting 2 06-30-2009 06:51 AM
crontab issue crackthehit007 UNIX for Advanced & Expert Users 4 03-23-2009 12:32 AM
crontab issue vaddi HP-UX 11 01-28-2008 06:07 AM
crontab issue Semper_Tempus Solaris 6 07-19-2005 11:13 PM



All times are GMT -4. The time now is 07:53 PM.