The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
i want to give alias naree Shell Programming and Scripting 5 03-31-2008 10:00 AM
cron entry rujus UNIX for Dummies Questions & Answers 7 01-29-2007 05:36 PM
cron entry error capeme Shell Programming and Scripting 6 10-26-2006 10:05 AM
Cron job entry not running hkapil Shell Programming and Scripting 1 11-21-2005 10:46 AM
Cron entry rramanuj AIX 1 11-01-2005 02:35 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-12-2008
naree naree is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 81
I want to know how we can give alias entry in cron

Hi all

I have created an alias for a running a script called script.sh as

alias utils="sh ~/script.sh".

Moreover i m using bash shell, even i have given the entry for alias in .profile in my home directory.I have given alias entry in crontab file as

30 12 * * * utils

But it is not working . Can any one help me in this regard.

Thank U
Naree.
  #2 (permalink)  
Old 03-12-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,334
Place the alias in your .bashrc file in your homedirectory:


Code:
alias utils='~/script.sh'

If you use the cron mechanism to execute your script use the whole path and not your alias, something like:


Code:
30 12 * * * /home/username/script.sh

Regards
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:13 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0