Open hugolpz opened 3 years ago
Crontab is short for "CRON Table", itself short for "Chrono table". It's basically a file that lists various cron scripts.
# Run maintenance scripts on the production instance
00 4 * * * /usr/bin/php7.0 /home/www/lingualibre.fr/maintenance/cleanupUploadStash.php > /dev/null 2>&1
00 5 * * * /usr/bin/php7.0 /home/www/lingualibre.fr/maintenance/rebuildLocalisationCache.php > /dev/null 2>&1
These scripts run maintenance php scripts everyday at 4 and 5 AM. Same goes for the testing instance, only at slightly different times.
/home/www/lingualibre.fr/maintenance/rebuildLocalisationCache.php
, as an example, is the location of the php script that is run.
/home/www/lingualibre.fr
, there's no need to change it. /home/www/lingualibre.org
), then these cron scripts must be fixed.They also seem to send their logs to /dev/null
. That either means these scripts tend to send a ton of logs, or that they just don't log anything. It might be worth trying to output their logs in a log file, to see what comes out.
# Other stuff
30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/le-renew.log
45 2 * * 1 /bin/systemctl reload nginx
30 4 * * * logrotate /etc/logrotate.conf
These scripts reload nginx and eventually renew the SSL certificates with Let's Encrypt on Monday. And it daily does a logrotate
. Never encountered that command so far, but based on the name, I guess it should get rid of older logs - that's a way to prevent them from clogging up huge amounts of disk space.
There's this interesting website that lets you "convert" the cron "timestamps" scripts : https://crontab.guru
Hope it helps.
@Poslovitch, thank you for this study an definition. Please consider to Github-Watch this repository so you can be the referent-mentor on this repository. :+1:
I think @mickeybarber (WM-fr with mission on WM-fr's servers) will check those servers paths to report on them when he can. With the info he will return we can decide what to do.
Please consider to Github-Watch this repository so you can be the referent-mentor on this repository. 👍
@hugolpz Done.
What's interesting about this crontab is that it does not call the create_datasets.sh
script. This might have been overlooked in the transition (.fr to .org), since datasets have stopped being updated around that time. Yet, the file's git history shows us that it was never there.
Should we add it in there?
Maybe it wasn't part of the crontab for a good reason (server load? disk space? backend/API issues?).
Wow. Good catch. From memory, 0x010C told me create_datasets.sh
was run every odd day automatically. Need to find from where. (I'am off line for few days)
I suspect as soon as Michael will deploy the new create_datasets.sh
with .org
, datasets page will work again. But I don't know from where. If after a week it doesn't, then let add it in crontab ??
00 4 * * * /usr/bin/php7.3 /home/www/lingualibre.org/maintenance/cleanupUploadStash.php > /dev/null 2>&1
00 5 * * * /usr/bin/php7.3 /home/www/lingualibre.org/maintenance/rebuildLocalisationCache.php
0 3 */2 * * /bin/bash /home/www/create_datasets.sh
0 2 * * * /usr/bin/python3.5 /home/www/Lingua-Libre-Bot/llbot.py simple --startdate "`date -d "-2 days" --rfc-3339=date`" > /var/log/llbot.log 2>&1
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name lingualibre.fr www.lingualibre.fr;
ssl_certificate /etc/letsencrypt/live/lingualibre.fr/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/lingualibre.fr/privkey.pem;
return 301 https://lingualibre.org$request_uri;
}
dev.lingualibre.fr => /home/www/dev.lingualibre.fr/ dev.lingualibre.org => /home/www/lingualibre.org/ v1.lingualibre.fr =>/home/www/v1.lingualibre.fr/ v2.lingualibre.fr => /home/www/v2.lingualibre.fr/ lingualibre.org -> /home/www/lingualibre.org/
wikimedia@lingualibre:/home/www$ tree
.
├── blazegraph
│ ├── blazegraph-service-0.3.1-SNAPSHOT.war
│ ├── createNamespace.sh
│ ├── data
│ ├── default.properties
│ ├── docs
│ │ ├── Categories.md
│ │ ├── ChangeLog
│ │ ├── configs.md
│ │ ├── exploring-linked-data.md
│ │ ├── getting-started.md
│ │ ├── LICENSE.Apache
│ │ ├── LICENSE.GPL
│ │ ├── sparql-query-examples.md
│ │ └── TODO.md
│ ├── forAllCategoryWikis.sh
│ ├── jetty-runner-9.2.3.v20140905.jar
│ ├── jolokia.sh
│ ├── ldf-config.json
│ ├── lib
│ │ ├── jolokia-jvm-1.3.7-agent.jar
│ │ └── wikidata-query-tools-0.3.1-SNAPSHOT-jar-with-dependencies.jar
│ ├── loadCategoryDump.sh
│ ├── loadData.sh
│ ├── loadRestAPI.sh
│ ├── munge.sh
│ ├── prefixes.conf
│ ├── runBlazegraph.sh
│ ├── runUpdate.sh
│ ├── RWStore.properties
│ ├── services.json
│ ├── whitelist.txt
│ └── wikidata.jnl
├── CommonsDownloadTool
│ ├── commons_download_tool.py
│ └── LICENSE
├── create_datasets.sh
├── datasets
│ ├── lingualibre_full.zip
│ ├── Q101-srr-Serer.zip
│ ├── Q113-cmn-Mandarin Chinese.zip
│ ├── Q115107-bcl-Central Bikol.zip
│ ├── Q123-hin-Hindi.zip
│ ├── Q126-por-Portuguese.zip
│ ├── Q127-tam-Tamil.zip
│ ├── Q129-rus-Russian.zip
│ ├── Q130-zho-Chinese.zip
│ ├── Q131-hye-Armenian.zip
│ ├── Q141-cym-Welsh.zip
│ ├── Q150-afr-Afrikaans.zip
│ ├── Q154-amh-Amharic.zip
│ ├── Q159-dyu-Dioula language.zip
│ ├── Q165-hat-Haitian Creole.zip
│ ├── Q169-tgl-Tagalog.zip
│ ├── Q170137-mos-Mossi.zip
│ ├── Q19858-bci-Baoulé.zip
│ ├── Q203-cat-Catalan.zip
│ ├── Q204940-ken-Nyang language.zip
│ ├── Q205-gre-Greek.zip
│ ├── Q208-vie-Vietnamese.zip
│ ├── Q219-ara-Arabic.zip
│ ├── Q21-fra-French.zip
│ ├── Q221062-mis-Cantonese.zip
│ ├── Q22-eng-English.zip
│ ├── Q231-myv-Erzya.zip
│ ├── Q242-fon-Fon.zip
│ ├── Q24-deu-German.zip
│ ├── Q258-nso-Northern Sotho.zip
│ ├── Q25-epo-Esperanto.zip
│ ├── Q264201-ary-Moroccan Arabic.zip
│ ├── Q273-kab-Kabyle.zip
│ ├── Q298-pol-Polish.zip
│ ├── Q299-eus-Basque.zip
│ ├── Q307-ben-Bengali.zip
│ ├── Q311-oci-Occitan.zip
│ ├── Q318-bam-Bambara.zip
│ ├── Q321-gaa-Ga.zip
│ ├── Q336-ori-Odia.zip
│ ├── Q339-sat-Santali.zip
│ ├── Q33-fin-Finnish.zip
│ ├── Q34-mar-Marathi.zip
│ ├── Q35-nld-Dutch.zip
│ ├── Q385-ita-Italian.zip
│ ├── Q386-spa-Spanish.zip
│ ├── Q388-que-Quechua.zip
│ ├── Q389-jpn-Japanese.zip
│ ├── Q392-ces-Czech.zip
│ ├── Q397-heb-Hebrew.zip
│ ├── Q39-tel-Telugu.zip
│ ├── Q405-bas-Basaa language.zip
│ ├── Q437-mal-Malayalam.zip
│ ├── Q4465-mis-Teochew dialect.zip
│ ├── Q446-pan-Punjabi.zip
│ ├── Q44-swe-Swedish.zip
│ ├── Q45-nor-Norwegian.zip
│ ├── Q46-ltz-Luxembourgish.zip
│ ├── Q4901-shy-Shawiya language.zip
│ ├── Q51299-hav-Havu.zip
│ ├── Q51302-tay-Atayal.zip
│ ├── Q52067-bbj-Ghomala' language.zip
│ ├── Q52068-bum-Bulu language.zip
│ ├── Q52071-dua-Duala.zip
│ ├── Q52073-bdu-Oroko.zip
│ ├── Q52074-bzm-Londo.zip
│ ├── Q52295-atj-Atikamekw.zip
│ ├── Q6714-arq-Algerian Arabic.zip
│ ├── Q74905-mis-Sursilvan.zip
│ ├── Q80-kan-Kannada.zip
│ ├── Q83641-gcf-Guadeloupean Creole French.zip
│ ├── Q930-mis-Gascon dialect.zip
│ └── Q931-mis-Languedocien dialect.zip
├── dev.py
├── dev.sh
├── dump.rdf
├── dump.rdf.gz
├── Lingua-Libre-Bot
│ ├── config.ini
│ ├── config.ini.sample
│ ├── LICENSE
│ ├── llbot.py
│ ├── __pycache__
│ │ ├── frwiktionary.cpython-35.pyc
│ │ ├── llbot.cpython-35.pyc
│ │ ├── pywiki.cpython-35.pyc
│ │ ├── sparql.cpython-35.pyc
│ │ ├── version.cpython-35.pyc
│ │ └── wikidata.cpython-35.pyc
│ ├── pywiki.py
│ ├── README.md
│ ├── requirements.txt
│ ├── sparql.py
│ ├── version.py
│ └── wikis
│ ├── frwiktionary.py
│ ├── lexemes.py
│ ├── ocwiktionary.py
│ ├── __pycache__
│ │ ├── frwiktionary.cpython-35.pyc
│ │ ├── lexemes.cpython-35.pyc
│ │ ├── ocwiktionary.cpython-35.pyc
│ │ └── wikidata.cpython-35.pyc
│ └── wikidata.py
└── sparqlconfig
├── commands
├── dump.rdf.gz
├── prefixes.conf
├── reload.sh
├── service-0.3.1b-SNAPSHOT-dist.zip
└── whitelist.txt
Thanks a lot @mickeybarber ! I will digest your answer this weekend. :smiley: I will split this into several issue to focus on cronjobs here.
@Jitrixis, @Poslovitch : is one of you able to define what is ./crontab for ? Which skills are needed ?
I suspect it requires a Mediawiki / PHP / Backend expertises.
/crontab
- understanding/home/www/
actual folder structure and/crontab
file's paths/home/www/
? Please provide the/home/www/
folder's tree structure for 1, 2 or 3 levels, as necessary so see if it match the various./crontab
file's paths.Interpretation of results
lingualibre.fr
to new paths values ?Others
@mickeybarber, in the same server exploration you should bump into the following items which we would gain to document better...
home/www/v2.lingualibre.fr/
path still exists on the server ? I think this LL version 2 is the current lingualibre.org. So I expect thisv2
path and folder the be missing because it got renamed into a.org
path and folder. Can you see such thing ?https://dev.lingualibre.org/
(dev version) is online and working. To which actual folder and path does this correspond ?Note: the 5 points above are nearly the same question = share with us the directory structure so we may see the possible broken paths. This will help us to know which url are outdated and by which to replace them.