0

Hi all,

I have a running cron job as below:

*/10 * * * * java -classpath "/shared/smsfiles/camps/jean.jar" emailrpts "71.25.24.45" "sile@lango.com" "password" >>/dev/null

I would like to change the parameters "71.25.24.45" "sile@lango.com" "password" to "51.25.24.40" "jimbo@jalango.com" "passwordtwo".

Whenever I change on the crontab and save, the application running seems to still use the old values.

How can I make sure that I clear from the system the old values, and have it pick up the new values immediately?

Thanks in advance.

2
Contributors
10
Replies
11
Views
7 Years
Discussion Span
Last Post by dangari
0

What OS?
How are you trying to change the crontab?

Fedora release 11 (Leonidas)

Steps I have followed in changing the crontab:

1.# crontab -e (Hit enter)
2.press I key for(INSERT)
3.Make appropriate change on the line
4.press ESCAPE key
5.:wq (Hit enter)

Going back to view crontab entries, using :

# crontab -l

I see the changes have been saved on the cron.

*/10 * * * * java -classpath "/shared/smsfiles/camps/jean.jar" emailrpts "51.25.24.40" "jimbo@jalango.com" "passwordtwo" >>/dev/null

Can anyone please assist in telling me:
1) Why old crontab entries are still maintained for quite a while
2) If so, how can I clear the cache and have the new entries being taken into effect immediately.

Thank you all.

Edited by dangari: n/a

0

That looks fine. What I would do now is remove the >>/dev/null and check the output from the command. This should be e-mailed to the user that owns the crontab.

0

That looks fine. What I would do now is remove the >>/dev/null and check the output from the command. This should be e-mailed to the user that owns the crontab.

We do have some crontab entries that do not have the >>/dev/null.

The main issue is how caching seems to occur and how can one make sure it does not happen upon changing crontab entries?

Someone please shed some light on this.

0

I've never known cron to cache old crontabs. What output are you seeing in the e-mail? Does restarting the cron daemon make any difference?

0

I've never known cron to cache old crontabs. What output are you seeing in the e-mail? Does restarting the cron daemon make any difference?

What I am doing to restart the cron is:

service crond restart

This any good?

0

That's how I'd do it - I take it that you get successful stop/start messages - does it fix the problem?

0

That's how I'd do it - I take it that you get successful stop/start messages - does it fix the problem?

I do get the successful stop/start but it doesn't seem to solve the problem.

Kindly help.

0

Is the output being e-mailed?

Seems though that if I reboot the machine, the cache is cleared.
My problem is that this is really not good for the services we run, (frequent rebooting of the machine).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.