[nmglug] filezilla,cron

Michael mike at mountainstatestech.com
Mon Apr 4 06:28:29 PDT 2011


if you have shell access, you can run 'crontab -l to
see if you have any existing crontabs.
crontab -e  to edit or create a new crontab with an entry like:

*     18     *      *      *    /path/to/myscript

would run a script called myscript every day at 6pm.
If you need to save the data in the file, a script like

#!/usr/bin/bash
MYTIME='date $s'
cat /path/to/subjectfile > /path/to/wherever/$MYTIME
echo > /path/to/subjectfile

would save the current contents of your file to a file named
with a long unique number that represents the number of
seconds since Jan. 1970, and empty 'subjectfile' which is
the file you're worried about.

If you don't need to save the contents, just use the last line to empty
it every day.  I hope that's something like what you wanted to do

On 04/04/2011 05:41 AM, a wrote:
> I believe I have ftp with a SFTP-SSH transfer protocol.
>
> On Sun, 2011-04-03 at 18:22 -0600, Michael wrote:
>    
>> Do you have to use ftp ?  Or do you have ssh other shell access ?
>>
>>
>> On 04/03/2011 05:10 PM, a wrote:
>>      
>>> Dear Glug;
>>> Does anyone understand how to use cron with filezilla.I would like to
>>> limit the size of a cyclically enlarging file, on a repeating second day
>>> purge cycle.
>>> Regards
>>> Anthony
>>>
>>>
>>> _______________________________________________
>>> nmglug mailing list
>>> nmglug at lists.nmglug.org
>>> http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
>>>
>>>
>>>        
>> _______________________________________________
>> nmglug mailing list
>> nmglug at lists.nmglug.org
>> http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
>>      
>
> _______________________________________________
> nmglug mailing list
> nmglug at lists.nmglug.org
> http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
>
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nmglug.org/pipermail/nmglug-nmglug.org/attachments/20110404/d1e60cb5/attachment.htm>


More information about the nmglug mailing list