Sponsored Content
Top Forums Shell Programming and Scripting How to call .profile in cron? Post 91674 by Cameron on Sunday 4th of December 2005 08:13:39 PM
Old 12-04-2005
For the scripts that I've written, I execute the .profile within the script - not in cron.

hence, in the script ${SCRIPTS}/backup_mysql.sh, you would see ...
Code:
#!/usr/bin/ksh
...
#- Ensure User Environment Set -#
. ${HOME}/.profile
...
[rest of script]

Hope that's of some help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

changed .profile but didnt ./.profile, yet reflected changes

hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix. please explain.. thanks (4 Replies)
Discussion started by: yls177
4 Replies

2. Solaris

cron .profile

The cronusers .profile doesn't seem to get call when running things in the cron. What am I doing wrong? (1 Reply)
Discussion started by: Schoey
1 Replies

3. Shell Programming and Scripting

Please Help: How to Call SSH Trust from Cron job.

Hi All, I am tring to excute a SSH trust command from a script which is invoked by crontab. Details: Crontab file contains the following line: 15 00 * * * /users/dummy_user/dummy_script1.sh dummy_script1.sh contains the following line: SSH -1 server_2... (4 Replies)
Discussion started by: suman82
4 Replies

4. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

5. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

Good morning. I am searching for "how-to"'s for some particular questions: 1. How to write a script in HP-UX 11. 2. How to schedule a script. 3. How to "call" scripts from the original script. 4. How to su to another user from within a script. This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies

6. Shell Programming and Scripting

Call .profile in perl script

Hello Gurus Can anyone please let me know how to call .profle file in perl script When I am calling the .profile file its giving error Shall I create unix script which has .profile command and call perl script internally (2 Replies)
Discussion started by: Pratik4891
2 Replies

7. UNIX for Advanced & Expert Users

Can we call crontab -e into .profile?

Hi All, I have a doubt that can we call under whatever scripts we mention in crontab -e into .profile . Because every weekend my server is going to restart so, my doubt whether crontab -e will automatically run my scripts or manually we have to save the crontab -e again? If that crontab... (3 Replies)
Discussion started by: ksrivani
3 Replies

8. AIX

Commands to call script work from command line but not from Cron entry

My first post evidently did not materialize so I posted it again: Runnning a cron job every 5 mins to send data files to a state facility. My original cron entry at worked fine: 01,06,11,16,21,26,31,36,41,46,51,56 * * * * /home/sftpuser/stateinoc-from-appname.ksh Somewhere I have a... (1 Reply)
Discussion started by: Skyybugg
1 Replies

9. Shell Programming and Scripting

How do i call aliases from my .profile?

Hello all, Please my shell is ksh. I created .profile such that users can pick environments they want to use: echo Select your Environment!! echo " 1. Nigeria DEV" echo " 2. UEMOA DEV" echo " 3. CEMOA DEV" echo "Make your choice : \c" read choice if then ... fi if then (6 Replies)
Discussion started by: mofaloks
6 Replies

10. Shell Programming and Scripting

Attemp to call the .profile

i have this line of code on my script #!/bin/sh #enable the environment variable thru profile . .profile when i run the script it was unable to find the .profile sh ChgPwd.sh ChgPwd.sh: line 4: .: .profile: file not found the file .profile exists ls -altr .profile... (2 Replies)
Discussion started by: wtolentino
2 Replies
yum-cron(8)															       yum-cron(8)

NAME
yum-cron - an interface to convieniently call yum from cron SYNOPSIS
yum-cron [config-file] DESCRIPTION
yum-cron is an alternate interface to yum that is optimised to be convenient to call from cron. It provides methods to keep repository metadata up to date, and to check for, download, and apply updates. Rather than accepting many different command line arguments, the dif- ferent functions of yum-cron can be accessed through config files. config-file is used to optionally specify the path to the configuration file to use. If it is not given, the default configuration file will be used. It is useful to be able to specify different configuration files for different use cases. For example, one configuration file might be set to update the repository metadata, and a line could be added to the crontab to run yum-cron frequently using this file. Then, another configuration file might be set to install updates, and yum-cron could be run from cron using this file just once each day. FILES
/etc/yum/yum-cron.conf /etc/yum/yum-cron-hourly.conf SEE ALSO
yum (8) AUTHORS
See the Authors file included with this program. BUGS
There of course aren't any bugs, but if you find any, you should email the mailing list, yum@lists.baseurl.org, or consult bugzilla. Nick Jacek yum-cron(8)
All times are GMT -4. The time now is 08:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy