Skip to content

Scheduler Installation and Configuration

Installation on Ubuntu 24.04

Note: The scheduler process currently runs on the same server as the websocket server. If the below is done on the same server after the websocket server has been set up, some of it won't be necessary, but running it anyway shouldn't cause any issues.

Install Node

apt update -y
apt install nodejs -y
node -v

Install NPM

apt install npm

Install Supervisor

apt update -y
apt install supervisor -y
systemctl status supervisor

Deploying from DeployHQ

Create a server deployment from the Method Grid app repository to the scheduler server.

Follow DeployHQ's instructions for giving DeployHQ access to the server, then set the following options: - Deployment path: /usr/src/scheduler - Environment: production - Subdirectory to deploy from: scheduler/

Deploy the code.

Configuration

Create Scheduler Supervisor .conf File

Create log directory:

mkdir /var/log/mg-scheduler

Create /etc/supervisor/conf.d/scheduler.conf:

[program:scheduler]
command=/usr/bin/node /usr/src/scheduler/schedule-listener.mjs --rabbit-mq-host=10.131.115.116 --db-host=10.131.115.106 --db-username=method-grid --db-password=C2NZP1z0bINkA0u --db-name=method-grid --rabbit-mq-username=mg --rabbit-mq-password={rabbit-mq-password}
autostart=true
autorestart=true
stderr_logfile=/var/log/mg-scheduler/scheduler.error.log
stdout_logfile=/var/log/mg-scheduler/scheduler.log

Restart Supervisor

systemctl restart supervisor && systemctl enable supervisor

Verify that scheduler process is running

supervisorctl status
Last modified by: Unknown