Suljettu

Create a simple crontab with putty

I have a script for putty.

If i copy the script in putty and press ENTER, everythink works fine.

My script do this steps well after past it in putty and press ENTER:

a) download a file with shell from the remote server to the local server

b) convert the file from ANSI to UTF-8

c) start magmi tool to import the downloaded file

This is my code:

#!/bin/bash

HOST='website' # change the ipaddress accordingly

USER='username' # username also change

PASSWD='passw' # password also change

ftp -inv $HOST<<EOF

quote USER $USER

quote PASS $PASSWD

bin

cd /

lcd "dev-projekt-top/var/import/"

mget [url removed, login to view]*

cd dev-projekt-top/var/import

lcd "/dev-projekt-top/var/import/"

mget [url removed, login to view]*

bye

EOF

cd dev-projekt-top/var/import

iconv -f "windows-1252" -t "UTF-8" [url removed, login to view] -o [url removed, login to view]

cd ..

cd ..

cd ..

cd ..

cd dev-projekt-top/magmi/cli

php6 [url removed, login to view] -profile=csv_auto -mode=update

But if i past this code in a ssh file and run it with a crontab, the cron do not start.

Your job is very simple: create a correct crontab to run our ssh file.

If you like, you can create your own script to download a remote file to local server and convert it from ANSI to UTF. Then you have to rund Magmi with this line:

php6 [url removed, login to view] -profile=csv_auto -mode=update

Thank you.

Taidot: Apache, Linux, Magento, Shell Script, UNIX

Näytä lisää: run shell script from php, remote magento job, download dev php, create shell script, create a profile website, bash copy

Tietoa työnantajasta:
( 2 arvostelua ) Germany

Projektin tunnus: #9937782

32 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

linuxfreak1985

Hi there, My name is Yaseen and i am 1 of the top freelancers and i'm expert to complete these types of project. Please start private conversation with me and provide complete information about project so that we can Lisää

$30 USD 1 päivässä
(628 arvostelua)
8.0
zyeloncomputech

Hi sir, Thank you for giving opportunity for biding... we have gone through your requirements and we can do your crontab with putty according to your exact requirements. Please Before Awarding this project to Lisää

$24 USD 0 päivässä
(138 arvostelua)
6.6
odessky

Hello! My name is Andrey. I'm from Odessa, Ukraine. I have right skills and great experience for begin working on your project just right now! You may show good reviews at my profile https://www.freelancer.com/u/odessk Lisää

$35 USD 1 päivässä
(137 arvostelua)
6.4
VnBestSolutions

Dear Sir. We claim to get it done perfectly for you EXACTLY in the way you want it - Kindly give we a chance and we will prove myself - Ready to prove our words, let's get it done right away and I mean RIGHT AWAY !! Lo Lisää

$34 USD 1 päivässä
(67 arvostelua)
5.8
$25 USD 1 päivässä
(21 arvostelua)
4.6
gnouv

hello, i think u should fill full path of mysql, not only php6. smt ike /usr/bin/php6

$10 USD 1 päivässä
(4 arvostelua)
3.2
jeremysiedzik

Hello, Hoping that I get the job, otherwise I will give you my thoughts on the matter. A few things that are probably going wrong: 1st. The user that is running the crontab, is it the same as the putty termina Lisää

$15 USD 1 päivässä
(4 arvostelua)
2.8
fenixdevel

Hello! I can develop the required script for you and configure crontab. Have you tried to run the script from the linux shell? What was the result? Please provide me also with the crontab entry. How often do Lisää

$20 USD 1 päivässä
(1 arvostelu)
2.1
sachinkumar19

A proposal has not yet been provided

$15 USD 1 päivässä
(4 arvostelua)
2.2
euredan

Hello. I work in 24/7 linux servers support. I can help you with this task. Best regards, Eugene D.

$10 USD 1 päivässä
(3 arvostelua)
2.3
hasanucak

hi. crontab run on own environment variable. so we can write full path for executable program and env , more good. my experience bash script,php,perl.... on linux for years. some of my work is [login to view URL] Lisää

$15 USD 1 päivässä
(1 arvostelu)
2.2
bicaig

Hello, I can make a try to make your script running. Please contact me if you like to discuss it.. Best regards, Gabriel Bica

$15 USD 1 päivässä
(1 arvostelu)
1.2
alexrn

Hello. I will need an access you your server to setup your script and crontab. I think I know what the problem you have and ready to fix it quickly.

$15 USD 1 päivässä
(1 arvostelu)
0.9
$10 USD 1 päivässä
(2 arvostelua)
0.4
Tarun22sh

for last 10 years, I am working on linux environments. Let me know when you have time to discuss. i can do your task.

$15 USD 1 päivässä
(0 arvostelua)
0.0
remowenger

Hi there, I'm a very experienced Network and Linux System Engineer. I am running about 40 Linux Servers for our customers. There are a lot of cronjobs that makes our lives as administrator easier. I can quickly help Lisää

$66 USD 1 päivässä
(0 arvostelua)
0.0
jrahamathulla

Dear Are you searching for a software engineer with a proven ability to develop high-performance applications and technical innovations? If so, please consider my enclosed resume. Since 2006, I have served as a s Lisää

$15 USD 1 päivässä
(1 arvostelu)
0.0
UroshA

I had same problem before, but I solved and made crontab runs my scrips without problem, and also does not require changes to sudoers.

$15 USD 1 päivässä
(0 arvostelua)
0.0
jlponton

I worked for a worldwide semi-conductor company for more than 15 years and worked exclusively in Unix/Linux, including working with scripts that would transfer files. I hope to have the opportunity to help you with yo Lisää

$15 USD 1 päivässä
(0 arvostelua)
0.0
$15 USD 1 päivässä
(0 arvostelua)
0.0