<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/20148" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2016-05-07T19:32:19-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/20148</id>

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-05-07T19:32:19-04:00</updated>

		<published>2016-05-07T19:32:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104989#p104989</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104989#p104989"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104989#p104989"><![CDATA[
Sorry willyw, I had not read your answer. <br><br>The upload was made in binary format and it works.<br>I read that for the .txt files is advisable ascii.<br>But now that I work properly, I do not want to try anything else.<br><br>Did you see the solution I found in the previous answer ?<br>Thanks to you and <strong class="text-strong">caesar</strong> for their support .<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat May 07, 2016 7:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-05-07T19:03:41-04:00</updated>

		<published>2016-05-07T19:03:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104987#p104987</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104987#p104987"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104987#p104987"><![CDATA[
I did it!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"> <br>In the end I used this <a href="http://snarvaez.com.ar/libertad/index.php/2009/02/15/automatiza-tareas-con-bash-shell-scripts-en-gnu_linux/" class="postlink">tutorial</a> .<br>Combining the .netrc file with FTP macros and bash script.<br>The .ntrc file provides security so that passwords are not stored in plain text.<br>Then the orders are given by macdef (FTP macros) .<br>At the end I invoke the macro created with a bash script.<div class="codebox"><p>Code: </p><pre><code>&gt; Echo " $ updateTxt " | ftp -v ftp.ejemplo.com</code></pre></div>.netrc file with macro:<div class="codebox"><p>Code: </p><pre><code>machine ftp.ejemplo.comlogin user_loginpassword the_user_passmacdef updateTxtlcd /home/juan/datascd /www/data/txtsput myfile.txtbye</code></pre></div>updata.sh script:<div class="codebox"><p>Code: </p><pre><code>#!/bin/shecho "$ updateTxt" | ftp -v ftp.ejemplo.com</code></pre></div>crontab:<div class="codebox"><p>Code: </p><pre><code>* * * * * /home/juan/datas/updata.sh &gt;/dev/null 2&gt;&amp;1</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat May 07, 2016 7:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2016-05-07T16:42:24-04:00</updated>

		<published>2016-05-07T16:42:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104986#p104986</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104986#p104986"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104986#p104986"><![CDATA[
<blockquote class="uncited"><div>...<br>But , not upload nothing ....<br>...<br>Any suggestions ?</div></blockquote>This works for me.  Runs once daily, via crontab:<br><div class="codebox"><p>Code: </p><pre><code>ftp -n -v -p &lt;&lt;EOFopen address.to.open.goes.hereuser username_here password_hereasciicd HTMLput filename_to_upload_hereclosebyeEOF</code></pre></div>You will need to decide if you need the <br>ascii<br>command and the <br>cd<br>command.  You may or may not need them.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sat May 07, 2016 4:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-05-07T16:15:40-04:00</updated>

		<published>2016-05-07T16:15:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104985#p104985</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104985#p104985"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104985#p104985"><![CDATA[
I had problems permission to record the file jajaja!<br><br>I could already record the log in my directory and I found something interesting ....<br>The crontab runs !<br>But , not upload nothing ....<br><span style="text-decoration:underline">The crontab log</span>:<blockquote class="uncited"><div>local: live.txt remote: live.txt<br>221-Goodbye. You uploaded 0 and downloaded 0 kbytes.<br>221 Logout.</div></blockquote>What worries me is this: <strong class="text-strong">You uploaded 0</strong><br><span style="text-decoration:underline">Manually ejecution log</span>:<blockquote class="uncited"><div>local: live.txt remote: live.txt<br>227 Entering Passive Mode (xxx,xxx,xx,xxx,227,44)<br>150 Accepted data connection<br>226-File successfully transferred<br>226 0.006 seconds (measured here), 4.62 Kbytes per second<br>28 bytes sent in 5,1e-05 secs (549,02 Kbytes/sec)<br>221-Goodbye. You uploaded 1 and downloaded 0 kbytes.<br>221 Logout.</div></blockquote><strong class="text-strong"><br><br>New conclusion</strong>: If the script execution is manually upload the file, if done through a crontab not upload.<br>Any suggestions ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat May 07, 2016 4:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2016-05-07T15:39:31-04:00</updated>

		<published>2016-05-07T15:39:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104984#p104984</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104984#p104984"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104984#p104984"><![CDATA[
<blockquote class="uncited"><div>...<br>Conclusion: crontab does not run  </div></blockquote><br>Do something more simple to test if crontab is running.<br><br>Use nano to create a plain text file - in your home dir - with one line in it, like this:<br><div class="codebox"><p>Code: </p><pre><code>date &gt;&gt; /home/your_name_here/somefilename</code></pre></div>Use chmod to make this new file you have just created executable.<br>If you named the new file tempfile , it would be<br>chmod u+x tempfile<br><br>Check to be sure it is executable by viewing the list of files and permissions with:<br>ls -latr<br><br>Next:<br>add a line like this in crontab:<div class="codebox"><p>Code: </p><pre><code>* * * * * /home/your_name_here/tempfile &gt;/dev/null 2&gt;&amp;1</code></pre></div>and save.<br><br>It will run once every minute.<br>(I just did this - that above line is copy-n-paste from my crontab, with one obvious edit -  and it works.<br><br>It will write the date and time to the file named   somefilename<br>in your home dir, every minute, on the minute.<br>It will be very easy to see if it is working.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sat May 07, 2016 3:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-05-07T15:02:13-04:00</updated>

		<published>2016-05-07T15:02:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104983#p104983</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104983#p104983"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104983#p104983"><![CDATA[
Supposedly with the following code, puts the output of the commands into the log file "mylog", but is not stored in /var/log/mylog<div class="codebox"><p>Code: </p><pre><code>* * * * * /home/juan/mycode.sh &gt;&gt;/var/log/mylog</code></pre></div><div class="codebox"><p>Code: </p><pre><code>[juan@vps804251 ~]$ cd /var/log[juan@vps174886 log]$ pwd/var/log[juan@vps174886 log]$ find mylogfind: ‘mylog’: No such file or directory</code></pre></div>With the "ls" command  I do not see that file.<br>Conclusion: crontab does not run  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat May 07, 2016 3:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-05-06T11:32:57-04:00</updated>

		<published>2016-05-06T11:32:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104982#p104982</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104982#p104982"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104982#p104982"><![CDATA[
For every 1 minute shouldn't it be <em class="text-italics">*/1 * * * *</em> ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri May 06, 2016 11:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2016-05-06T10:33:12-04:00</updated>

		<published>2016-05-06T10:33:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104981#p104981</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104981#p104981"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104981#p104981"><![CDATA[
<blockquote class="uncited"><div><br>I try <div class="codebox"><p>Code: </p><pre><code> * * * * *</code></pre></div> <br></div></blockquote>This is the usual way of doing 'every minute'<br><br>I just noticed this post of yours now....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri May 06, 2016 10:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2016-05-06T10:30:38-04:00</updated>

		<published>2016-05-06T10:30:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104980#p104980</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104980#p104980"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104980#p104980"><![CDATA[
<blockquote class="uncited"><div>...<div class="codebox"><p>Code: </p><pre><code>* */1 * * * /home/juan/mycode.sh &gt;/dev/null 2&gt;&amp;1</code></pre></div></div></blockquote><blockquote class="uncited"><div>...It has to be every minute, ...</div></blockquote>Your line quoted first above, is not the standard way of doing 'every minute'.<br><br>Check out:<br><a href="https://www.pantz.org/software/cron/croninfo.html" class="postlink">https://www.pantz.org/software/cron/croninfo.html</a><br><br>for an example of how to do it every minute.<br><br>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri May 06, 2016 10:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-05-06T10:22:16-04:00</updated>

		<published>2016-05-06T10:22:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104979#p104979</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104979#p104979"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104979#p104979"><![CDATA[
It has to be every minute, this script checks the change songs on the radio .<br>The songs last more than a minute, but the DJ can change the song, so you should check minute a minute.<br><br>I try <div class="codebox"><p>Code: </p><pre><code> * * * * *</code></pre></div> and <div class="codebox"><p>Code: </p><pre><code>0-59 * * * *</code></pre></div> and <div class="codebox"><p>Code: </p><pre><code>1,2,3......59 * * * *</code></pre></div> y don´t work.<br><br>But, you think the cron does not work for the short period of time?<br>I tried every 3 and every 5 minutes and it has not worked .<br>I think that is another problem ...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Fri May 06, 2016 10:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-05-06T10:11:20-04:00</updated>

		<published>2016-05-06T10:11:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104978#p104978</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104978#p104978"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104978#p104978"><![CDATA[
Try with:<div class="codebox"><p>Code: </p><pre><code>0 * * * * sh /home/juan/mycode.sh &gt; /dev/null 2&gt;&amp;1 </code></pre></div>You wanted a every hour execution, right?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri May 06, 2016 10:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-05-06T03:47:13-04:00</updated>

		<published>2016-05-06T03:47:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104976#p104976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104976#p104976"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104976#p104976"><![CDATA[
Neither it worked .<br>Can I see  behavior this cron by console , to see bugs?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Fri May 06, 2016 3:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-05-06T01:06:06-04:00</updated>

		<published>2016-05-06T01:06:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104975#p104975</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104975#p104975"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104975#p104975"><![CDATA[
Try with add adding <em class="text-italics">sh</em> in front of the path like:<div class="codebox"><p>Code: </p><pre><code>* */1 * * * sh /home/juan/mycode.sh &gt; /dev/null 2&gt;&amp;1</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri May 06, 2016 1:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-05-06T00:13:35-04:00</updated>

		<published>2016-05-06T00:13:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104974#p104974</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104974#p104974"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104974#p104974"><![CDATA[
Thanks caesar by your contribution, and I did work with a bash script , I have a problem with me crontab does not work with this script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"> <br>It's weird, because all crontabs works properly .<br>I used this <a href="http://serverfault.com/questions/279176/ftp-uploading-in-bash-script" class="postlink">example</a> to the bash.<br>My crontab entry for this script is:<div class="codebox"><p>Code: </p><pre><code>* */1 * * * /home/juan/mycode.sh &gt;/dev/null 2&gt;&amp;1</code></pre></div>Script doesn't run via crontab, but works fine standalone in the linux console with:<div class="codebox"><p>Code: </p><pre><code>sh mycode.sh</code></pre></div>I've tried other configurations without success for the moment ...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Fri May 06, 2016 12:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-05-05T02:11:45-04:00</updated>

		<published>2016-05-05T02:11:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104972#p104972</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104972#p104972"/>
		<title type="html"><![CDATA[Is posible?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104972#p104972"><![CDATA[
You could also have a look at user's <a href="http://forum.egghelp.org/viewtopic.php?p=74938" class="postlink">socket api - nonblocking tcp made easy</a> topic where he shared some interesting things.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu May 05, 2016 2:11 am</p><hr />
]]></content>
	</entry>
	</feed>
