Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make a cronjobbable script to clock uploads?
    primarykey
    data
    text
    <p>I asked a similar question over here:(<a href="https://stackoverflow.com/questions/1495604/upload-clocking-script">Upload clocking script</a>), but then changed it and realized it's a different question now.</p> <p>I want to make a script called uploadtimer.sh which uploads files to various hosts and then notes the time the upload takes in a log file. Thanks to those who have helped me, I have a partial solution but I'm stuck:</p> <p>I used this as a crontab (testing it for the first ten minutes after 11 am)</p> <pre><code>1,2,3,4,5,6,7,8,9,10 11 * * * /usr/bin/time -a /usr/local/apache/sites/$MYEMPLOYER/upload_test/output.log /usr/local/apache/sites/$MYEMPLOYER/upload_test/uploadtimer.sh </code></pre> <p>upload_test/ has these files in it:</p> <p>upload_test/output.log upload_test/uploadtest.gif upload_test/uploadtimer.sh</p> <p>output.log is a text file that I renamed as a .log file. It's blank. Before I put it there, I was getting messages that said "this file doesn't exist". I thought it'd create one for me but I guess not. After I created it, it kept saying in the crontab mails that I couldn't write to it until I changed its permissions, so I did.</p> <p>uploadtest.gif is a gif</p> <p>uploadtimer.sh is this:</p> <pre><code>#!/bin/sh HOST='--myhost--' USER='--login--' PASSWD='--password--' FILE='uploadtest.gif' ftp -n $HOST &lt;&lt;END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE quit END_SCRIPT exit 0 </code></pre> <p>The message that cron sends to me is:</p> <pre><code>0.00user 0.00system 0:00.02elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+253minor)pagefaults 0swaps </code></pre> <p>But no ftp has taken place and nothing it written in output.log.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload