Ubuntu Server 10.04 LTS - Regular crontab "caches old scripts"


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Ubuntu Server 10.04 LTS - Regular crontab "caches old scripts"
# 1  
Old 11-09-2011
Question Ubuntu Server 10.04 LTS - Regular crontab "caches old scripts"

Hi,

I'm using a Ubuntu Server 10.04 LTS and it works like a charm, except for the regular crontab.

Onde day a user had some problems with crontab, i analyse it and i see no problemns, all my stuff is working right. Cron is running smoth...
I only noticed it when i altered a script already scheduled in my root crontab!!!

- I understand that so many people make mistakes like permissions, paths, env, setting schedules and so on... My problem is diferent!!!

example:
1 - Create a script in (whatever) user and runs OK, and echoes or writes to log for example 5
2 - crontab -e, insert the schedule and path, and works OK
3 - Later i remember and alter my script so that it echoes not a 5 but a 6
4 - Always getting the 5 echoed from crontab, like sentence #1.
5 - It seens like it cached the script(old version) and now dont execute the updated script. (the old; the same script before change seems to be some kind of in cache and it always runs that one, that dont exist anymore...) Smilie

I have tryed:

- Disable/ enable cron
- Disable / enable swap
- Clean /tmp
- restart cron daemon
- rename script and put another entry
- cron as aditional line after entry, paths all right
- script has shabang
- Except a rebbot because is a production machine running stuff...

I only see this behaviur in this ubuntu server version...

It seens that i have to make my script and my entry perfect at first time... any later change (in the script) dont updates (dont now where) and cron always run the first version of the script... even if does not exist anymore...Smilie

from the shell everything is ok and the script is actualy the updated script of course SmilieSmilie

Strange stuff ubuntu... :wall

PS: All users using regular old school crontab... -e, -r, -l in vi


Many Thankz
# 2  
Old 11-29-2011
similar problem

I had similar problem on RHEL 4.x

Had You found the solution or explanations?

My cron used old version of script half of the night, but now I see it using fresh one.
# 3  
Old 11-29-2011
Reinstall and solved the problem... No explanation Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Dummies Questions & Answers

"Help with bash script" - "License Server and Patch Updates"

Hi All, I'm completely new to bash scripting and still learning my way through albeit vey slowly. I need to know where to insert my server names', my ip address numbers through out the script alas to no avail. I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
Discussion started by: profileuser
25 Replies

3. UNIX for Dummies Questions & Answers

Scripts exists but crontab says "File not found"

Hi All, We have an archiving script on our applications box. It is scheduled to run at 36th minute every hour. 36 * * * * /archive_7.sh But it throws an error saying "sh: /archive_7.sh: not found". I am not able to understand why. # ls -l /archive_7.sh ; file /archive_7.sh -rwxr-xr-x ... (4 Replies)
Discussion started by: satish51392111
4 Replies

4. Shell Programming and Scripting

Bash (Ubuntu server): Syntax error: "|" unexpected in While-loop

Hello forum, I hope my problem is easy to solve for someone in here! My main task is to copy a large amount of imap-accounts from one server to another. There is a tool (Perl) called imapsync which does the job exellent. Unfortunately I'm only able to run it on one account at a time. After... (3 Replies)
Discussion started by: primaxx
3 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

list all scripts in crontab which contains the string "sqlplus"

Hi folks I use a Solaris 10 box with Bash shell. I have here a script (it works!) to list all scripts in crontab which contains the string "sqlplus": for i in $(ls `crontab -l | grep -v '#' | awk '{ print $6 }' | grep -v '^$'`); do grep -l 'sqlplus' "$i"; done Is there a more elegant... (1 Reply)
Discussion started by: slashdotweenie
1 Replies

7. Linux

Regular expression to extract "y" from "abc/x.y.z" .... i need regular expression

Regular expression to extract "y" from "abc/x.y.z" (2 Replies)
Discussion started by: rag84dec
2 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question