Welcome to WebmasterWorld Guest from 23.20.186.146

Forum Moderators: bakedjake

Message Too Old, No Replies

Cron job questions

     
6:13 pm on Mar 28, 2009 (gmt 0)

5+ Year Member



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

8:29 pm on Mar 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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?

Take a look at anacron.

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?

Wise? No. It is wise to have things run with no more permissions than they need to get the work done. Throwing root at the problem is just asking for trouble.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month