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...) :eek:

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...:confused:

from the shell everything is ok and the script is actualy the updated script of course :):b:

Strange stuff ubuntu... :wall

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

Many Thankz

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.

Reinstall and solved the problem... No explanation :slight_smile: