Skip to main content

⏰ Cron configuration

Installation

Assuming you have a folder /home/[user]/services

Clone the project

cd /home/[user]/services && git clone https://github.com/louisgrasset/touitomamout.git

Install dependencies & build the project

npm ci && npm run build 

Define environment variables

3 types of environment variables are required to run the sync:

  • Core variables: required in situations, get them here.
  • Sync variables: required for the sync you want, get them here.
  • Cron variables: required for the cron, get them here.
Environment file generator

Feel free to generate your .env file with the generator

Once your env variables are ready, inject them in a .env.[handle_to_sync] file. (e.g: .env.signalapp)

Run it!

You can create your own cron expression here: crontab.guru.

First, enter the cron editor:

crontab -e

Then, add the following line to run the sync every 30 minutes:

*/30 * * * * cd /home/[user]/services/touitmamout && node ./dist/index.js .env

Finally, save and exit the editor.