ktsirig Posted March 28, 2009 Share Posted March 28, 2009 Hello all! I need to run a script periodically to get some updates, so I thought I should better place it under the cron jobs. I have 2 questions: a) This is rather silly maybe... If I schedule the script to be executed every Tuesday at 4pm for example, and the pc is turned off at that time, this means that the script will be not executed for this Tuesday and it will have to wait another week to be executed again? b) It is wise to set "root" user as the user for the specific program to make sure that it has all the necessary permissions to download my updates in any folder I specify in the script? I mean, if I set a plain, restricted user as the user that runs the script, I may face problem if the script saves its downloads in /usr/local/share for example, where the plain user normally does not have write access. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/151536-cron-jobs-questions/ Share on other sites More sharing options...
will35010 Posted March 29, 2009 Share Posted March 29, 2009 A: No it will not run if the machine is off. B: You have three options: 1. run script as root (I've never had a security issue doing that.) 2. Change file permissions that the script uses. 3. Give the script user credentials necessary to run. An example would be sudo under debian. Quote Link to comment https://forums.phpfreaks.com/topic/151536-cron-jobs-questions/#findComment-796111 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.