Re: Crontab in solaris10


 
Thread Tools Search this Thread
Operating Systems Solaris Re: Crontab in solaris10
# 1  
Old 05-02-2008
Re: Crontab in solaris10

Hi all,

I wrote a small shell (bash) script and it was executing well. I'm getting problem when I use this in crontab. My script is:

#!/usr/bin/bash

mkdir `date '+%m-%d-%y'`

cd `date '+%m-%d-%y'`

cvs co -r br_name module

cd dir1/dir2/dir3

bash build.sh


this is doing well when executed as a script but when I tried to execute this command through crontab I'm getting errors.

It is creating directory but not able to checkout from CVS. can anyone solve this?

And one thing I'm doing this on solaris10 where as the CVS repository is on Linux.

Thanks all......
# 2  
Old 05-02-2008
First: Guys, post your errors here. We don't like to guess.

Second: For sure you get errors. Think about in which working directory cron will run your script

Third: if you're using build tools not available in standard path you should add an explizit $PATH there
# 3  
Old 05-02-2008
Im getting error something like this

cvs checkout: No CVSROOT specified! Please use the `-d' option
cvs [checkout aborted]: or set the CVSROOT environment variable.
# 4  
Old 05-02-2008
i'm running this crontab in my home directory.....




and we are not using any build tools......we are using 'make' command to do builds....
# 5  
Old 05-02-2008
Quote:
Originally Posted by gullapalli
i'm running this crontab in my home directory.....




and we are not using any build tools......we are using 'make' command to do builds....
well... what do you think 'cvs' is?
Maybe this FAQ will help!
# 6  
Old 05-02-2008
version management tool......

I changed the script like this

#!/usr/bin/bash

mkdir `date '+%m-%d-%y'`

cd `date '+%m-%d-%y'`

source .profile

export CVSROOT=Smilieserver:sgullapalli@linux1:/polaris/local/cvsroot

/opt/sfw/bin/cvs co -r br_name module

cd dir1/dir2/dir3

bash build.sh


but now i'm getting errors like:

sh: source: not found
sh: CVSROOT=Smilieserver:sgullapalli@linux1:/polaris/local/cvsroot: is not an identifier
# 7  
Old 05-02-2008
try this after reading the FAQ - modify to satisfy your requirements:
Code:
#!/binksh

today=$(date '+%m-%d-%y')

. ${HOME}/.profile
export CVSROOT=server:sgullapalli@linux1:/polaris/local/cvsroot

mkdir "${HOME}/${today}"

cd "${HOME}/${today}"

/opt/sfw/bin/cvs co -r br_name module

cd dir1/dir2/dir3

build.sh

Also, pls use vB Codes when posting code or data file samples.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris10 and pxeLinux

I want to run solaris10 with my pxelinux server i put on pxelinux.cfg/default this LABEL solaris 10 kernel mboot.c32 append -solaris solaris/boot/platform/i86pc/kernel/unix -v -m verbose install dhcp nowin nfs://192.168.0.2/jumpstart/config.tar -B install_media=192.168.0.2:/solaris... (0 Replies)
Discussion started by: Linusolaradm1
0 Replies

2. Solaris

Msktutil on Solaris10

Technical Prose: Solaris integration with Active Directory - Part I follow this guide,install solarisgcc,and dev libraries required. But after configure i get checking for res_search... yes checking for krb5_init_context in -lkrb5... yes checking for ldap_initialize in -lldap... yes... (0 Replies)
Discussion started by: Linusolaradm1
0 Replies

3. Solaris

Service not starting Solaris10

On one of our server inetd service has stuck in transition state , tried restarting it but it does not do any thing and there is no associated inetd process for the same , how can i start it .. w/o rebooting it svcs inetd STATE STIME FMRI online* 16:44:55... (3 Replies)
Discussion started by: fugitive
3 Replies

4. Solaris

Solaris10

Hi All How can we verify if any of the parameters we have change in Solaris10 after reboot. Like is there any command? Please advice Thanks (3 Replies)
Discussion started by: imran721
3 Replies

5. Solaris

Sun Solaris10

hi to all, I am newuser can anyone tell me from where i get the sun solaris 10 dumps. plz mail me at (no email addresses - read the RULES of these forums) (2 Replies)
Discussion started by: quickgun
2 Replies

6. Solaris

Using mailx under solaris10

Hello all. I am a new user Solaris10, on a sunblade100. And I need help. How to send an e-mail on command line under solaris 10 ? I try mailx-s "subject" snacks@yahoo.fr without success. I would like to know why? What files do I configure? Thank you in advance. best regards. (3 Replies)
Discussion started by: SnackS
3 Replies

7. UNIX for Dummies Questions & Answers

Inst. Solaris10

I just download solaris 10, from sun.com, I have them ziped in my HD, How can I install them, so I can run solaris10, my present os is RH9; THANKS (5 Replies)
Discussion started by: mxlst14
5 Replies

8. IP Networking

Detecting NIC in Solaris10

I have an E420 server that has a TPE Slot / NIC installed. However there is no interface file installed eg /etc/hostname.hme0 or equivalent. I have placed a private ip entry int the hosts file to accompany the loop back entry i.e. 127.0.0.1 localhost 172.16.0.10 loghost se420 ... (1 Reply)
Discussion started by: jimthompson
1 Replies

9. UNIX for Advanced & Expert Users

Detecting NIC in Solaris10

I have an E420 server that has a TPE Slot / NIC installed. However there is no interface file installed eg /etc/hostname.hme0 or equivalent. I have placed a private ip entry int the hosts file to accompany the loop back entry i.e. 127.0.0.1 localhost 172.16.0.10 loghost se420 ... (1 Reply)
Discussion started by: jimthompson
1 Replies

10. Solaris

help,win2003 and solaris10 in a pc?

sorry,my english is poor. who can install win2003 and solaris10 in one pc ? my win2000server in hda1 so frist install win2003 in hda5 second install solaris10 in hda2 but after install over,the win2003 can't logon in. alway let me press<ctrl>+<alt>+<del>. why? (1 Reply)
Discussion started by: keyi
1 Replies
Login or Register to Ask a Question