Re: root crontab
Excellent recommendation from John, but ... On Thu, 13 Nov 2008, John McKown wrote: ... What I do in many cases is have cron run a script. That script then sources /etc/profile and ~/.bash_profile. Another possibility would be to have cron run a login shell * * * * * /bin/bash -L ...cmd... I strongly recommend avoiding profile and config files which are specific to a particular shell. Better would be to instead source /etc/profile and ~/.profile and teach your users to do the same. Not only does Linux have alternatives to BASH but if you're in any mixed environment you possibly won't have BASH on the others (BSD, OpenVM, AIX, Solaris, HP, whatever). BASH has a lot of cool extensions which people are tempted to use. (Using them is fine and good, but entrenching BASH in the rest of your system is foolish.) Remember to start with #!/bin/bash if you want BASH-specific features. But don't expect such a script to run on your non-Linux systems right away. -- R; Maranatha! Amen! -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
root crontab
I am running Slack/390 10.1, and I am trying to schedule a cron job to run with root authority. Nothing I put in the root crontab seems to be firing. This is the first cron task that I have attempted to set up as root. Is there more that needs to be done than just add the entry in crontab to set up a new cron user? Thanks, Russell Jones ANPAC -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: root crontab
On 11/13/2008 at 12:53 PM, Jones, Russell [EMAIL PROTECTED] wrote: I am running Slack/390 10.1, and I am trying to schedule a cron job to run with root authority. Nothing I put in the root crontab seems to be firing. This is the first cron task that I have attempted to set up as root. Is there more that needs to be done than just add the entry in crontab to set up a new cron user? There shouldn't be. Usually failure of crontab entries to work are related to assuming that the various environment variables a user normally has (such as PATH) will be set when cron fires off the task. They aren't. So, instead of having commands like cp from to you should try /bin/cp from to and so forth. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: root crontab
On Thu, 13 Nov 2008, Mark Post wrote: On 11/13/2008 at 12:53 PM, Jones, Russell [EMAIL PROTECTED] wrote: I am running Slack/390 10.1, and I am trying to schedule a cron job to run with root authority. Nothing I put in the root crontab seems to be firing. This is the first cron task that I have attempted to set up as root. Is there more that needs to be done than just add the entry in crontab to set up a new cron user? There shouldn't be. Usually failure of crontab entries to work are related to assuming that the various environment variables a user normally has (such as PATH) will be set when cron fires off the task. They aren't. So, instead of having commands like cp from to you should try /bin/cp from to and so forth. Mark Post What I do in many cases is have cron run a script. That script then sources /etc/profile and ~/.bash_profile. Another possibility would be to have cron run a login shell * * * * * /bin/bash -L ...cmd... -- Q: What do theoretical physicists drink beer from? A: Ein Stein. Maranatha! John McKown -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390