Results 1 to 2 of 2
Hi there,
I am running some PHP command line scripts in root which update the crontab file.
The scripts run OK but after when I type 'rccron status' to check ...
- 11-04-2008 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 13
cron problems
Hi there,
I am running some PHP command line scripts in root which update the crontab file.
The scripts run OK but after when I type 'rccron status' to check cron it reports that it is unused. This is annoying because at the end of my scripts I put the line
exec('/usr/sbin/rccron restart');
Which should ensure that cron is restarted after ammending file crontab ...
Anyone got any ideas ?
Steven M
- 11-14-2008 #2Just Joined!
- Join Date
- Nov 2008
- Posts
- 26
The fact that you have that line in the script, does not mean it's being executed... and does not mean it's being executed correctly. For example, I can write the following script and not worry about it shutting down the system:
exit
shutdown -h now
Also, if I am not root, the script will not shut down the system even if the exit is removed.
So what I'm saying is, are you sure (can you prove) that the script is doing what you believe it to be doing? I would seriously suspect an authorization issue since the user under which your scripts are running is (hopefully) not one who has enough authority to execute that function without help.


Reply With Quote
