<div dir="ltr"><div><div>Oh...are you running this on a Linux OS? My experience with crontab has been at the command prompt, but there is a coded way of scheduling the script to run. Here's an example of one that I use:<br>
<br>SHELL=/bin/tcsh<br>0 3,9,15,21 * * * cd /chinook/jdduda/forecast; run_4km_NAM_plots.tcsh >& NAM_cron.log<br><br></div>This tells my script to run the script run_4km_NAM_plots.tcsh at hour 3, 9, 15, and 21 (LT). I found I had to include the SHELL and directory changes in order to get it to run correctly on the system I use (probably to overwrite some defaults). Then it's just a simple<br>
<br>crontab crontab_forecast<br><br></div>where crontab_forecast was the text file containing the two lines of code above, to get the job to go on its own. Perhaps it works differently with other OSs or architectures.<br>
<br>Jeff<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 6, 2014 at 7:07 PM, Perry, Aaron @ LSC <span dir="ltr"><<a href="mailto:Aaron.Perry@lsc.vsc.edu" target="_blank">Aaron.Perry@lsc.vsc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Which crontab file would you suggest inserting it into?</p>
<p><br>
</p>
<p>I've been trying to use sudo crontab -e and drag/dropping the script into /etc/cron.hourly/ but,haven't had much luck. Been experimenting with gnome-schedule.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>
<div name="divtagdefaultwrapper">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma"><font size="3"><font face="Arial"><font face="Tahoma"><font></font></font></font></font>
<div style="font-size:13px;font-family:Tahoma"><font size="3"><font face="Arial"><font face="Tahoma"><font><br>
<strong>Onward and Upward,<br>
<br>
</strong></font><strong>Aaron D. Perry<br>
</strong></font><font size="3"><font size="3"><font face="Tahoma"><strong>Atmospheric Sciences<br>
Lyndon State College<br>
Class of 2016<br>
</strong></font></font></font></font></font><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma"><strong><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma">Boston, MA</font></font></font></font></font>
<br>
Twitter: </strong><a href="https://twitter.com/AaronPerryLSC" target="_blank"><strong>@AaronPerryLSC</strong></a><br>
<strong>Web: <a href="http://weathercdn.com/" target="_blank">weathercdn.com</a></strong></font></font></font></font></font><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma"><strong></strong></font></font></font></font></font></div>
<div style="font-size:13px;font-family:Tahoma"><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma"><strong>Mobile: 617-780-4312</strong></font></font></font></font></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> <<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>> on behalf of Jeff Duda <<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>><br>
<b>Sent:</b> Wednesday, August 06, 2014 6:43 PM<br>
<b>To:</b> GrADS Users Forum<br>
<b>Subject:</b> Re: [gradsusr] No Text Plots When Script Executed Via Crontab</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>It's possible that the crontab software is overwriting those environmental variables. Try setting them inside the text of the cron script.<br>
<br>
</div>
Jeff Duda<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Aug 6, 2014 at 4:56 PM, Perry, Aaron @ LSC <span dir="ltr">
<<a href="mailto:Aaron.Perry@lsc.vsc.edu" target="_blank">Aaron.Perry@lsc.vsc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Michael,</p>
<p><br>
</p>
<p>Thanks for replying to my question.</p>
<p><br>
</p>
<p>I currently have the following at the top of the shell script:</p>
<p><br>
</p>
<p>#!/bin/sh<br>
<br>
export PATH=/mnt/grads:$PATH<br>
export GADDIR=/mnt/grads/<br>
export GASCRP=/home/aaron/scripts/dec2013</p>
<p><br>
</p>
<p>I also have that in .bashrc file.<br>
</p>
<div>
<p><br>
</p>
<p><br>
</p>
<div>
<div name="divtagdefaultwrapper">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma"><font size="3"><font face="Arial"><font face="Tahoma"><font></font></font></font></font>
<div style="font-size:13px;font-family:Tahoma"><font size="3"><font face="Arial"><font face="Tahoma"><font><br>
<br>
<strong>Onward and Upward,<br>
<br>
</strong></font><strong>Aaron D. Perry<br>
</strong></font><font size="3"><font size="3"><font face="Tahoma"><strong>Atmospheric Sciences<br>
Lyndon State College<br>
Class of 2016<br>
</strong></font></font></font></font></font><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma"><strong><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma">Boston, MA</font></font></font></font></font>
<br>
Twitter: </strong><a href="https://twitter.com/AaronPerryLSC" target="_blank"><strong>@AaronPerryLSC</strong></a><br>
<strong>Web: <a href="http://weathercdn.com/" target="_blank">weathercdn.com</a></strong></font></font></font></font></font><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma"><strong></strong></font></font></font></font></font></div>
<div style="font-size:13px;font-family:Tahoma"><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma"><strong>Mobile: 617-780-4312</strong></font></font></font></font></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b>
<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> <<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>> on behalf of Frost, Mr. Michael <<a href="mailto:Michael.Frost@nrlmry.navy.mil" target="_blank">Michael.Frost@nrlmry.navy.mil</a>><br>
<b>Sent:</b> Wednesday, August 06, 2014 5:52 PM<br>
<b>To:</b> GrADS Users Forum<br>
<b>Subject:</b> Re: [gradsusr] No Text Plots When Script Executed Via Crontab</font>
<div> </div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Are you setting the GADDIR inside your script?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Michael Frost<br>
Naval Research Laboratory<br>
Marine Meteorology Division<br>
7 Grace Hopper Avenue, Stop #2<br>
Monterey, CA 93940<br>
Phone: 831-656-4723<br>
Fax: 831-656-4314<br>
Email: <a href="mailto:mike.frost@nrlmry.navy.mil" target="_blank">mike.frost@nrlmry.navy.mil</a></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>]
<b>On Behalf Of </b>Perry, Aaron @ LSC<br>
<b>Sent:</b> Wednesday, August 06, 2014 2:19 PM<br>
<b>To:</b> GrADS Users Forum<br>
<b>Subject:</b> [gradsusr] No Text Plots When Script Executed Via Crontab</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<p><span style="font-family:"Calibri","sans-serif";color:black">Good Afternoon All,</span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"> </span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">I'm currently trying to execute a shell script (.sh) in crontab that runs GrADS.</span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"> </span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">I am able to run the shell script fine on it's own but, when I run it via crontab, I always get the following error:</span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"> </span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">Error opening stroke character data set
<br>
Data set names = /usr/local/lib/grads/font0.dat ; font0.dat</span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"> </span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">I have GrADS installed in /mnt/grads/ and all the associated font#.dat files in /mnt/grads/ so, I'm a bit perplexed as to why my system thinks that GrADS is in /usr/local/lib/.</span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"> </span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">Any ideas?</span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"> </span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"> </span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"> </span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"> </span></p>
<div>
<div name="divtagdefaultwrapper">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><strong><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">Onward and Upward,</span></strong><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></span></p>
<div>
<p class="MsoNormal"><strong><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">Aaron D. Perry</span></strong><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><br>
<strong><span style="font-family:"Tahoma","sans-serif"">Atmospheric Sciences</span></strong><br>
<strong><span style="font-family:"Tahoma","sans-serif"">Lyndon State College</span></strong><br>
<strong><span style="font-family:"Tahoma","sans-serif"">Class of 2016</span></strong><br>
<strong><span style="font-family:"Tahoma","sans-serif"">Boston, MA </span></strong><br>
<strong><span style="font-family:"Tahoma","sans-serif"">Twitter: </span></strong></span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><a href="https://twitter.com/AaronPerryLSC" target="_blank"><strong><span style="font-family:"Tahoma","sans-serif"">@AaronPerryLSC</span></strong></a><br>
<strong><span style="font-family:"Tahoma","sans-serif"">Web: <a href="http://weathercdn.com/" target="_blank">
weathercdn.com</a></span></strong></span></p>
</div>
<div>
<p class="MsoNormal"><strong><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">Mobile: 617-780-4312</span></strong><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<br clear="all">
<br>
-- <br>
Jeff Duda<br>
Graduate research assistant<br>
University of Oklahoma School of Meteorology<br>
Center for Analysis and Prediction of Storms<br>
</font></span></div>
</div>
</div>
</div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>
</div>