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.

Recommended Answers

All 10 Replies

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

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.

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.

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.

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?

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?

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

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.

Is the output being e-mailed?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.