S
S
sorry_i_noob2018-11-20 05:59:17
open server
sorry_i_noob, 2018-11-20 05:59:17

Is there any way to do a Cron export/import? How about a database in mysql, for example?

Hello! I wrote a web application in php. And one of its key features is Cron. I want to put the application on github. And to simplify the work of the person who wants to deploy this application at home as much as possible. Is it possible to export Cron somehow? And then import it?
If anything, I'm using OpenServer. But I didn't include it in the tags, as the one who downloads the app may be using a different server.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
roswell, 2018-11-20
@sorry_i_noob

crontab -l > my.crontab # экспорт
crontab < my.crontab # импорт
man crontab # про всё это вот

Y
Yuri, 2018-11-20
@riky

in such cases, it is more correct to make one script (runs once a minute / 5 minutes or as many as necessary for the most frequent command) that inside itself launches other commands at the right time.
this is also convenient because with updates everything will work right away and you won’t have to ask people to synchronize your crowns.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question