Why can't cron run one of my scripts [SOLVED]

I'm confused why cron can't run one of my scripts which runs just fine interactively.  I see no errors in messages.log or crond.log.
My crontab:
$ crontab -l
# * * * * command to be executed
#| | | | |
#| | | | +----- day of week (0 - 6) (Sunday=0)
#| | | +------- month (1 - 12)
#| | +--------- day of month (1 - 31)
#| +----------- hour (0 - 23)
#+------------- min (0 - 59)
#MAILTO=""
25 20 * * * ~/bin/cpuz s
Here is the code to that script:
run() {
tmpfile=/tmp/.sensors_unique.txt # temp output
verbose=/tmp/.verbose_unique.txt # verbose temp output with three decimals
logfile=/scratch/unique.csv # data file to write
sensors >$tmpfile && sensors -u >$verbose
phys=$(grep Physical $tmpfile | cut -c 18-21)
c0=$(grep "Core 0" $tmpfile | cut -c18-21)
c1=$(grep "Core 1" $tmpfile | cut -c18-21)
c2=$(grep "Core 2" $tmpfile | cut -c18-21)
c3=$(grep "Core 3" $tmpfile | cut -c18-21)
vcc=$(grep in0_input $verbose | cut -c14-18)
fan1=$(grep fan1 $tmpfile | cut -c24-27)
pwm1=$(cat /sys/class/hwmon/hwmon3/device/pwm1)
per1=$(echo "scale=2; $pwm1/2.55" | bc)
fan3=$(grep fan3 $tmpfile | cut -c24-27)
pwm3=$(cat /sys/class/hwmon/hwmon3/device/pwm3)
per3=$(echo "scale=2; $pwm3/2.55" | bc)
fan4=$(grep fan4 $tmpfile | cut -c24-27)
pwm4=$(cat /sys/class/hwmon/hwmon3/device/pwm4)
per4=$(echo "scale=2; $pwm4/2.55" | bc)
fan5=$(grep fan5 $tmpfile | cut -c24-27)
pwm5=$(cat /sys/class/hwmon/hwmon3/device/pwm5)
per5=$(echo "scale=2; $pwm5/2.55" | bc)
dts=$(date +"%m-%d-%y %r")
[[ ! -f $logfile ]] && echo "dts,vcc,temp,core0,core1,core2,core3,120mm_rpm,120mm_pwm,140mm_rpm,140mm_pwm,comment" > $logfile
echo "$dts,$vcc,$phys,$c0,$c1,$c2,$c3,$fan4,$pwm4,$fan5,$pwm5,$comment" >> $logfile
if [ -n "$output" ]; then
echo "Vcore : $vcc"
echo "back : $fan1 ($pwm1/255) = $per1 %"
echo "top : $fan3 ($pwm3/255) = $per3 %"
echo "120mm : $fan4 ($pwm4/255) = $per4 %"
echo "140mm : $fan5 ($pwm5/255) = $per5 %"
fi
case "$1" in
s)
limit=600 # number of times to run
wait=2 # delay in sec before taking a new reading
echo running in silent mode...
x=0
while [ "$x" -lt "$limit" ]; do
x=$(( $x + 1 ))
run
sleep "$wait"s
done
v)
export output="not null"
export -f run
/usr/bin/watch run
echo "usage $0 {s|v}"
echo
echo "s) silent mode/logfile only"
echo "v) verbose mode/logfile + output"
exit 0
esac
Last edited by graysky (2012-08-01 00:44:16)

I hate to suggest something obvious to someone with 4000 posts (and such a scary avatar), but have you tried it with the full path: /home/user/... ?
Are you sure the script is not being run at all?
(edit -- never mind, I see the file lines in there)
Last edited by 2ManyDogs (2012-08-01 00:33:03)

Similar Messages

  • Why can i see only one picture in the illustration windows with iTunes 10.5.1?

    why can i see only one picture in the illustration windows since iTunes 10.5.1?

    Assuming Apple doesn't eviscerate the files of the secondary graphics with another upgrade, there could be a plug in that reads the graphic and runs along side iTunes..we should get someone or Apple to program an alternative If we have to accept this downgrade in iTunes proper.
    I've developed a quick workaround, and am still hoping Apple will fix this!
    Go To Get Info on the tune you want to see secondary artwork for.
    Go To the Artwork tab
    Drag the back cover to the desktop, and it will create a new jpg you can open with quick viw or prieview where you can see it large!
    you end up with a lot of jpgs on the desktop to discard!

  • Why can't I run quicktime videos on ipad2?

    why can't I run quicktime videos on ipad2?

    Eric-
    QuickTime is capable of playing more video formats than the iPad.  The iPad can play M4V, MP4 and some MOV format videos.  It can not play formats like WMV and FLV.
    One thing you can do is to convert the video formats on your computer. 
    A free program that can do it is HandBrake, which is available for both PC and Macintosh at <Download>.
    Fred

  • Why?  Why can't I run iMovie and have it

    Why? Why can't I run iMovie and have it ask me whether I want to load an existing project or new one? I don't see a setting for this in Preferences.
    thanks

    I haven't gone to the trouble of actually testing to see which uses more CPU power, but Firefox has been faster than Safari on every Mac I've ever owned.
    To see CPU usage by process, open the terminal (in Utilities) and enter 'top' at the command line. You might have to expand the window as processes don't appear in any logical order.
    It could also be hardware-related: I have late 2009 mini with similar specs and it pinwheels easily.

  • Ever since the systyem upgraded me to 3.6.6. I can not even run one eight hour day without firefoc either crashing or locking up which requires me use C/A/Deleate to close the program. I used to be able to run 8 to 12 windows at a time and NEVER lock up

    Ever since the systyem upgraded me to 3.6.6. I can not even run one eight hour day without firefoc either crashing or locking up which requires me use C/A/Deleate to close the program. I used to be able to run 8 to 12 windows at a time and NEVER lock up or crash with the older version. Is this problem being looked into and or being corrected. I use Firefox with Google and my system is XP Pro 32 bit. THIS IS REALLY making me MAD. My email is [email protected] and would appreciate a response to this ASAP. I have tried a couple of items from your help section and nothing works.

    <u>'''Anonymous'''</u>
    Please post a separate question. Thank you. https://support.mozilla.com/tiki-ask_a_question.php?locale=en-US&forumId=1
    <u>'''chris'''</u>
    <u>'''''Crashing'''''</u>
    See:
    http://support.mozilla.com/en-US/kb/Firefox+crashes
    http://kb.mozillazine.org/Firefox_crashes
    http://support.mozilla.com/en-US/kb/Firefox+crashes+when+loading+certain+pages
    http://support.mozilla.com/en-US/kb/Firefox+crashes+when+you+open+it
    http://support.mozilla.com/en-US/kb/Firefox+will+not+start
    http://kb.mozillazine.org/Browser_will_not_start_up
    ''<u>'''Hanging'''</u>''
    See: http://support.mozilla.com/en-US/kb/Firefox+hangs
    <u>'''''Hanging at exit'''''</u>
    <u>'''Kill Application'''</u>
    In Task Manager, does firefox.exe show in the <u>'''Processes'''</u> tab?
    See: [http://kb.mozillazine.org/Kill_application Kill Application]
    '''<u>Causes and solutions for Firefox hanging at exit:</u>'''
    [[Firefox hangs]]
    [http://kb.mozillazine.org/Firefox_hangs#Hang_at_exit Firefox hangs at exit]
    [[Firefox is already running but is not responding]]
    ''<u>'''Safe Mode'''</u>''
    You may need to use '''[[Safe Mode]]''' (click on "Safe Mode" and read) to localize the problem. Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes <u>'''before'''</u> starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    See:
    '''[[Troubleshooting extensions and themes]]'''
    '''[[Troubleshooting plugins]]'''
    '''[[Basic Troubleshooting]]'''
    If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling <u>'''one at a time'''</u> until the problem reappears. <u>'''You MUST close and restart Firefox after EACH change'''</u> via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.
    <u>'''chris'''</u>
    <u>'''''Other Issues'''''</u>: ~~red:You have installed plug-ins with known security issues. You should update them immediately.~~
    <u>'''Update Java'''</u>: your ver. 1.6.0.~~red:17~~; current ver. 1.6.0.20 (<u>important security update 04-15-2010</u>)
    (Firefox 3.6 and above requires Java 1.6.0.10 or higher; see: http://support.mozilla.com/en-US/kb/Java-related+issues#Java_does_not_work_in_Firefox_3_6 )
    ''(Windows users: Do the manual update; very easy.)''
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates Updating Java]'''
    Do the update with Firefox closed.
    <u>'''NOTE:'''</u> Java version 1.6.0.21 has been released. It is mainly an update for developers of Java applications and most users do not need to be concerned about downloading version 1.6.0.21. <u>'''''At this time'''''</u>, the update option in existing installations of Java 1.6.0.20 are not updating to version 1.6.0.21; <u>'''''at this time'''''</u>, it must be manually downloaded and installed. According to the Java release notes:
    ''"'''Bug Fixes'''''
    ''Java SE 6 Update 21 does not contain any additional fixes for security vulnerabilities to its previous release, Java SE 6 Update 20. Users who have Java SE 6 Update 20 have the latest security fixes and do not need to upgrade to this release to be current on security fixes."'' Source: http://java.sun.com/javase/6/webnotes/6u21.html
    <u>'''Install/Update Adobe Flash Player for Firefox (aka Shockwave Flash)'''</u>: your ver. 10.0 r~~red:45~~; current ver. 10.1 r53 ('''important security update 2010-06-10'''; see: http://www.adobe.com/support/security/bulletins/apsb10-14.html)
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Managing+the+Flash+plugin#Updating_Flash Updating Flash]'''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    -exit Firefox (File > Exit)
    -''<u>In Windows,</u>'' check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -''<u>In Windows,</u>'' double-click on the Adobe Flash installer you just downloaded to install/update Adobe Flash
    -when the Flash installation is complete, start Firefox, and test the Flash installation here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507&sliceId=1
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version of Flash. To install/update the IE ActiveX Adobe Flash Player, same instructions as above, except use IE to download the ActiveX Flash installer. See: [[ActiveX]]
    *Also see: http://kb.mozillazine.org/Flash ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]
    <u>'''Update Shockwave for Director (aka Shockwave Player)'''</u>: your ver. ~~red:10.1 (very old)~~; current ver. 11.5.7.609 (<u>important security update released 2010-05-11</u>; see http://www.adobe.com/support/security/bulletins/apsb10-12.html)
    NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    SAVE the installer to your hard drive (Desktop is a good place so you can find it). When the download is complete, exit Firefox (File > Exit), locate and double-click in the installer you just downloaded, let the install complete.
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox#_Installing_Shockwave Installing Shockwave]'''
    <u>'''You '''</u>~~red:<u>'''MAY'''</u>~~<u>''' need to Update Adobe Reader for Firefox (aka Adobe PDF Plug-In For Firefox)'''</u>: your ver. N/A; current ver. 9.3.3 (important security update release 06-29-2010; see: http://www.adobe.com/support/security/bulletins/apsb10-15.html)
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: http://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox#Installing_and_updating_Adobe_Reader
    ''<u>You may be able to update from the Adobe Reader installed on your system</u>'' instead of going to the Adobe site and downloading. Open the Adobe Reader installed on your system (''in Windows, Start > Program Files, find and click Adobe Reader to open''), click Help, click Check for Updates.
    ''<u>If you go to the Adobe site to download the current Adobe Reader:</u>''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    ~~red:-See the images at the bottom left of this post to see the steps to take on the Adobe site~~
    -exit Firefox (File > Exit)
    -In Windows: check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -In Windows: double-click on the Adobe Reader installer you just downloaded to install/update Adobe Reader
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version. To install/update the IE ActiveX version, same instructions as above, except use IE to download the ActiveX installer. See: [[ActiveX]]
    *Also see: http://kb.mozillazine.org/Adobe_Reader ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]

  • Why can't i run itunes on my windows 8?, why can't i run itunes on my windows 8?

    why can't i run itunes on my windows 8 laptop..?

    Hi sincerelystef,
    If you are having issues installing iTunes on your Windows machine, you may find the following article helpful:
    Apple Support: Trouble installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/HT1926
    Regards,
    - Brenden

  • Why can I only add one app in passbook?

    Why can I only add one app (Starbucks) in Passbook? 

    You can add many passes to Passbook, what makes you think you can only add one?
    Check out http://support.apple.com/kb/HT5483.

  • As of late i have been unable to run fwd email u tube videos my mac tells me i need adobe flash got it still neg = and now my bakn statement is in pdf and mac tells me i need adobe reader got still neg why can't i run these things on safari?

    As of late I am unable to run forwarded videos ie utube ect on safari- my MAC tells me I need adobe flash- got it still neg - now my bank statement is in PDF format and my MACtells me I need adobe reader - got it still neg  WHY CAN'T I RUN THESE THINGS ON SAFARI???

    Hi...
    For videos. Uninstall the current Flash plugin then reinstall new >  Troubleshoot Flash Player | Mac OS
    Quit then relaunch Safari. From the Safari menu bar click Safari > Empty Cache
    Try a video.
    All online bank statments are in PDF format.
    Go to  /Library/Internet Plug-Ins
    Move the Adobe PDF Browser plugin  (or just PDF Browser plugin) to the Trash.
    Now try a bank statement.

  • Why can't I run the new upgrade? All I get is that I am not connected to the internet, even though I am connected???

    Why can't I run the new upgrade? All I get is that I am not connected to the internet, even though I am connected???

    If you haven't, try updating through iTunes while connected to your syncing PC.

  • Why can't I run my Java program with just the JRE, the JDK is required?

    I've recently written 3 programs in Java using the Netbeans IDE with JDK 1.6 as the default Java platform. The compile-time libraries include the Swing Application Framework. I use BuildDesk from ProductiveMe to package the each program into a Windows installer.
    When I install the programs on a new computer without a JRE or JDK being present, and attempt to run them I get an error (as expected) stating that there is no JVM. The messages says that I need to install JDK 1.3 or higher. I downloaded the latest JRE onto the new computer and attempted to run the programs and I get the same error message. My question is, why can't I run these programs with just the JRE installed? Why do I need the JDK? When I install the JDK, the programs run fine. The typical user may not have the JDK on their system, but they likely have the JRE if they've run Java programs before.
    Is the answer as simple as there must be library functions being used by the programs that belong to the JDK, but not the JRE? I'd rather a user not have to install the JDK verses the JRE because they may also have to update some Windows environment variables.
    Thank you for any help on this issue.

    915088 wrote:
    Thanks for your replies. I further investigated BuildDesk and found an option which allows a JVM check but that check needs the JDK. I stopped the JVM check and rebuilt using BuildDesk and it now only requires the JRE to run the programs. The reason why I use BuildDesk is to package more than just the jar file for the user. BuildDesk allows me to create a installation folder structure as well as include any other files in the build. I could just as well zipped all this together for the user but decided against that method.I don't think anyone will question your usage of an installer tool; that is entirely up to you. But what is questionable is that you have problems with that installer tool and then go look for help in a Java programming forum. The next time, go look for help at the source. If there is no way to acquire help (support, a forum, a mailinglist, anything) then that is a very good reason to not use the product in question.

  • Why can't I run powerpc applications?

    why can't i run powerpc applications?

    Thank you Thomas!
    fishellnb wrote:
    do you know of any workarounds... ?
    Installing Snow Leopard (with Rosetta) into Parallels 7 in Lion:
                             [click on images to enlarge]
    And on Mountain Lion:
    Full Snow Leopard installation instructions here:
    http://forums.macrumors.com/showthread.php?t=1365439

  • Can you only run one main() in a jar?

    Hi,
    I was just wondering if you can only ever run one main() method from a .jar file? I have a project being developed in Eclipse, consisting of several packages and then several classes with main()s in each of the packages. When the whole project is packaged into one big jar then I can run one of the main() methods by specifying it in the manifest, but as far as I'm aware I can't access the others.
    Is there some cunning way to call the main() method of a different class to that specified in the jar manifest, or do I have to compile every class as a separate jar? And if that's the case, is there really any advantage to putting the classes into a jar as opposed to just running from the .class files?
    Any help much appreciated. :)
    h

    Wow, thanks for the quick responses guys!
    You can execute the other main methods byexecuting:
    java -cp the-class-path TheMainClassIsn't that just what I'd use from the compiled .class
    files though?Correct, but you specify the jar on your classpath. e.g.
    java -cp myjar.jar TheMainClasss1 or
    java -cp myjar.jar TheMainClasss2
    For example:
    java -cp the-class-path my.class1
    java -cp the-class-path my.class2
    How does this relate to a single .jar file containing
    both of those classes? See above
    If I try those commands in the
    directory containing the .jar file, I just get a
    NoClassDefFoundError (they work fine in the directory
    with the .class files though).That's because you didn't specify the classpath in the correct way.
    Kaj

  • Why can't I run in non-debug mode???

    I recently copied a JSC project into another project using the "Save Project As" option when right clicking on the project name.
    The new project appeared to copy fine and I was able to bild and run the project normally.
    Somewhere along the line, I did something that changed something to where I can no longer run the project in 'non-debug' mode by using either the 'Run Main Project Ctrl+F5' under the 'Run' menu or by clicking the Right Green 'Run" triangle on the main menu.
    The project builds successfully, but never runs in the browser.
    I have tried stopping the server and everything else I can think of, but nothing works.
    I can select 'Debug Main Project F5' from the 'Run' menu and it will build and start in the browser.
    Other projects, including the source for this one, run fine in 'nion-debug' mode, but not this one.
    How can I fix this??
    I have run into instances where I get a message that says the build.xml file was altered externallt and was rebuilt. Is there any way to force a remake of the build.xml file using "Standard" defaults?
    Thanks

    The reason for copying the project was in order to create another very similar product that required only minor modifications at this time.
    I got around the problem by doing another project copy and then using Beyond Compare to update the new copy with modifications I made to the original copy.
    That worked.
    My basic question was what would cause the problem that would create the situation where you could run in debug mode, but not non-debug mode.
    This happened after the original copy (that worked fine) and after I had done most of the required modifications.
    My thought was that there was some file or parameter that I could change rather than redoing the process.
    Apparently not......................

  • Why can't i run my clifford game on lion

    I upgraded to lion recently and now my preschooler can no longer run The Cliffor Learning game. Error message is this machine no longer supports power PC

    You can obtain an inexpensive external drive and install OS 10.6 on it. The most inexpensive external drives are USB 2, you can obtain a small one (500-GB) for well under $100. Sometimes you can find them for ~ $50 or so on sale at large stores. Install OS 10.6 on it and the programs you have that won't run under Lion. You can boot into the older OS external disk by holding down the option key when you start your Mac. Select that drive to boot from and it will run from that drive, where your child can run his older games.

  • Why can't I drag one folder into anoth

    If I create a new folder within Zen Media Explorer, why can I not drag another folder into it's
    This is how I arrange my MP3 albums on my PC ARTIST NAME folder--->ALBUM NAME folder--->MP3 TRACKS
    but when I use media explorer to transfer just one album from a multi album folder it transfers it without creating a folder of the artist name therefore I would have to do it manually, but thats isn't possible either.
    Now although this is fine on the player (if ID3 tags are completed) when I come back to media player I don't have the artist name info.
    Am I doing something wrong or has anybody else found this to be a problem
    Thanks
    DamonMessage Edited by damon33 on 0-22-2007:40 PM
    Message Edited by damon33 on 0-23-2007:24 PM

    Thanks Jerry. I just found this out by reading the "What has been lost in Numbers 3.0 upgrade" post by virtue of posing my question here ... In desperation, I downloaded FilemakerPro 13 trial and I am getting quite excited by this although I have commented to Apple that they may want to think about using the now redundant iWeb developers to build a new iWeb with DB capabilities integrating the new Numbers with all it's 09 features restored for ease of use. Will they listen? I doubt it. Ha. Cheers

Maybe you are looking for

  • Extract msi file from Adobe Reader 9

    I distribute Adobe Reader throughout the enterprise using the Customization utility. In past, up to and including Adobe Reader 8 I have been able to extract the msi file by finding the needed files in the %temp% folder. I am finding that is not true

  • Amount from 2 different columns. import format?

    Hi all, Im trying to import amounts from 2 different columns. If accounts are "123" or "234" or...etc Then pull from column else use column 9 can this be done in one import script? I want to know if I can assign import format amount to column 5 but o

  • Problem in installing SAP best practises v1.600

    Hi guys, we have to install SAP best practises v1.600 in ECC 6.0 version. i down loaded  SAP best practises v1.600 from www.service.sap.com But in that all building blocks are belongs to AUSTRALIA(with extention .AU) As i need to install with .US ext

  • After Effects crashing on splash screen Mac

    Hi, My After Effects (11?) cs6 will no longer open on my mid 2011 21.5 imac. I have been running it and the rest of the production premium suite for about a year now and have had no troubles with them up until now. Everytime I open it up it quickly f

  • Confirmation long text deletion

    Operation 010 is confirmed by the user with confirmation text (long text )which is incorrect ,now without reversing/cancelling the confirmation need to delete this confirmation text /long tex.t IW43 displayPM order confirmation screen.Need to know ho