LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   cron not working under cygwin (http://www.linuxquestions.org/questions/linux-software-2/cron-not-working-under-cygwin-817000/)

blainemiller 06-29-2010 11:01 AM

cron not working under cygwin
 
Hello,

I'm running cygwin 1.7 on a vanilla win2k3 r2 server. I've put together a simple crontab that I'll paste in her in a sec. The crontab entries call several shell scripts that do either scp's or rsync's from linux servers to this win2k3 box under cygwin.

The problem is that the scripts work and run fine from the commandline. Just not when called from the crontab. I'm running from the root equivalent administrator UID. The crontab log files are empty of errors.

crontab is:

0 5 * * * ./home/administrator/scripts/xfer_vvm_ora.sh
0 5 * * * ./home/administrator/scripts/xfer_nab_vnnab.sh
0 10 * * * ./home/administrator/scripts/xfer_nab_csnab.sh
0 6 * * * ./home/administrator/scripts/xfer_dellsrv20.sh
0 6 * * * ./home/administrator/scripts/xfer_directory.sh
0 6 * * * ./home/administrator/scripts/xfer_perforce.sh
0 6 * * 2 ./home/administrator/scripts/xfer_fileserv.sh
0 5 * * * ./home/administrator/scripts/xfer_vvm_mysql.sh


Like I said, the scripts execute fine from the command line.

Any help would be appreciated. Thanks in advance.

Blaine

TB0ne 06-29-2010 12:40 PM

Quote:

Originally Posted by blainemiller (Post 4018364)
Hello,

I'm running cygwin 1.7 on a vanilla win2k3 r2 server. I've put together a simple crontab that I'll paste in her in a sec. The crontab entries call several shell scripts that do either scp's or rsync's from linux servers to this win2k3 box under cygwin.

The problem is that the scripts work and run fine from the commandline. Just not when called from the crontab. I'm running from the root equivalent administrator UID. The crontab log files are empty of errors.

crontab is:
Code:

0 5 * * * ./home/administrator/scripts/xfer_vvm_ora.sh
0 5 * * * ./home/administrator/scripts/xfer_nab_vnnab.sh
0 10 * * * ./home/administrator/scripts/xfer_nab_csnab.sh
0 6 * * * ./home/administrator/scripts/xfer_dellsrv20.sh
0 6 * * * ./home/administrator/scripts/xfer_directory.sh
0 6 * * * ./home/administrator/scripts/xfer_perforce.sh
0 6 * * 2 ./home/administrator/scripts/xfer_fileserv.sh
0 5 * * * ./home/administrator/scripts/xfer_vvm_mysql.sh

Like I said, the scripts execute fine from the command line.

Please put things in CODE tags..makes it much easier to read. And Cygwin on a W23K server isn't really Linux, is it?

Regardless, remove the period from the "./home" and try it. You may also want to put something like "> /logs/xfer_nab_vnnab.log" after the commands, so you get some output of what's going on.

blainemiller 06-29-2010 01:43 PM

Thanks!

I'll give it a try and let you know...

And I agree with you on the Cygwin on win2k3, but it's what I've been given to work with. Sorry if I've offended the folks here with the "semi"-linux question.

Thanks again for the pointer...

Blaine

TB0ne 06-29-2010 03:10 PM

Quote:

Originally Posted by blainemiller (Post 4018529)
Thanks!

I'll give it a try and let you know...

And I agree with you on the Cygwin on win2k3, but it's what I've been given to work with. Sorry if I've offended the folks here with the "semi"-linux question.

Thanks again for the pointer...
Blaine

No offense taken at all, and I hope it helps. The only reason I mention it, is because the advice you get may ONLY work on Linux...Cygwin is a different animal, and may behave differently.


All times are GMT -5. The time now is 04:35 PM.