Find the answer to your Linux question:
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 ...
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    13

    Unhappy 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

  2. #2
    Just Joined!
    Join Date
    Nov 2008
    Posts
    26
    Quote Originally Posted by ksmatthews View Post
    Hi there,

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...