<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SFTP in Crontab in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-in-crontab/m-p/6829787#M489276</link>
    <description>&lt;P&gt;hello all....i had write a small script for SFTP some file from unix server to other Unix Server...the only possible way is using SFTP...i had use expect to automate the script...as well only expect is can be use...when i run the script manully it works fine...but when i had put it in crontab list to automatic scheduale for the script it failed...&lt;/P&gt;&lt;P&gt;my script as follow:&lt;/P&gt;&lt;P&gt;#!/usr/bin/env expect&lt;BR /&gt;set HOST xxxxx&lt;BR /&gt;set PORT 22&lt;BR /&gt;set USER xxxxx&lt;BR /&gt;set PASSWORD&amp;nbsp;xxxx&lt;BR /&gt;set SOURCE_FILE&amp;nbsp;my_source&lt;BR /&gt;set TARGET_DIR&amp;nbsp;my_target&lt;BR /&gt;spawn /usr/bin/sftp -o Port=$PORT $USER@$HOST&lt;BR /&gt;expect "password:"&lt;BR /&gt;send "$PASSWORD\r"&lt;BR /&gt;expect "sftp&amp;gt;"&lt;BR /&gt;send "put $SOURCE_FILE* $TARGET_DIR\r"&lt;BR /&gt;expect "sftp&amp;gt;"&lt;BR /&gt;send "bye\r"&lt;/P&gt;&lt;P&gt;my crontab is :&lt;/P&gt;&lt;P&gt;30 14 * * * /sched&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you please support to know who i can automate my script in crontab...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2016 07:40:16 GMT</pubDate>
    <dc:creator>hamedel-azzamy</dc:creator>
    <dc:date>2016-02-03T07:40:16Z</dc:date>
    <item>
      <title>SFTP in Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-in-crontab/m-p/6829787#M489276</link>
      <description>&lt;P&gt;hello all....i had write a small script for SFTP some file from unix server to other Unix Server...the only possible way is using SFTP...i had use expect to automate the script...as well only expect is can be use...when i run the script manully it works fine...but when i had put it in crontab list to automatic scheduale for the script it failed...&lt;/P&gt;&lt;P&gt;my script as follow:&lt;/P&gt;&lt;P&gt;#!/usr/bin/env expect&lt;BR /&gt;set HOST xxxxx&lt;BR /&gt;set PORT 22&lt;BR /&gt;set USER xxxxx&lt;BR /&gt;set PASSWORD&amp;nbsp;xxxx&lt;BR /&gt;set SOURCE_FILE&amp;nbsp;my_source&lt;BR /&gt;set TARGET_DIR&amp;nbsp;my_target&lt;BR /&gt;spawn /usr/bin/sftp -o Port=$PORT $USER@$HOST&lt;BR /&gt;expect "password:"&lt;BR /&gt;send "$PASSWORD\r"&lt;BR /&gt;expect "sftp&amp;gt;"&lt;BR /&gt;send "put $SOURCE_FILE* $TARGET_DIR\r"&lt;BR /&gt;expect "sftp&amp;gt;"&lt;BR /&gt;send "bye\r"&lt;/P&gt;&lt;P&gt;my crontab is :&lt;/P&gt;&lt;P&gt;30 14 * * * /sched&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you please support to know who i can automate my script in crontab...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 07:40:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-in-crontab/m-p/6829787#M489276</guid>
      <dc:creator>hamedel-azzamy</dc:creator>
      <dc:date>2016-02-03T07:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-in-crontab/m-p/6829883#M489277</link>
      <description>&lt;P&gt;i had solve the issue by change the Env in my script as well in my crontab&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 11:39:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-in-crontab/m-p/6829883#M489277</guid>
      <dc:creator>hamedel-azzamy</dc:creator>
      <dc:date>2016-02-03T11:39:07Z</dc:date>
    </item>
  </channel>
</rss>

