S
S
Sergey Bard2017-06-09 14:39:06
PHP
Sergey Bard, 2017-06-09 14:39:06

Python, parsing, cron?

Hello. I'm making an application in php, but now I need to parse a huge amount of data, and it's clear that php does this, but it takes a very long time.
I decided to start learning python in order to write a script that will run on cron and perform parsing, saving data.
I came across a problem, I can’t run the script, I start the task in the scheduler in this way

#!/usr/bin/env python /var/www/scms/data/www/site.com/core/cron/python.py

tried like this
/usr/bin/env python /var/www/scms/data/www/site.com/core/cron/python.py

so
python /var/www/scms/data/www/site.com/core/cron/python.py

nothing works (
in the python.py file so far, only this code, to check the operation of the cron
f = open('txt.txt', 'w')
f.write('Hello world')
f.close()

python.py and txt.txt files in the same folder.
Question two)
1) Please tell me what I'm doing wrong?
2) In general, is the idea normal or not?, I'm talking about the fact that I will use python for parsing, and for the rest of php, or are there other options?
Ps All the answers that I saw on the toaster and not only worked, otherwise I would not have written here)))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex F, 2017-06-10
@delvin-fil

Sergey Bard
You can't call a script by that name. Get 100% error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question