A
A
Andrew2018-12-23 16:30:16
PHP
Andrew, 2018-12-23 16:30:16

How to set up a php script to run via cron?

Good afternoon!
There is a php script for importing goods. There are a lot of goods and it is necessary to import them in parts, for example, 50 pieces. I usually do this with ajax, saving the steps to the session and restarting the script. But now we need the script to run automatically without user intervention.
I tried to run the path / to / script.php from the php console, I thought that there were no limits and you could do without steps, but after a few seconds it says Killed.
How can I do this via cron so that the script runs every day and imports the products in batches? Can cron work with sessions and restart the script within the same task?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2018-12-23
@webinar

https://www.google.com/search?q=%D1%81%D0%B5%D1%80...

I
Igor, 2018-12-23
@m0pfin

What is the hosting/server control panel?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question