# Message Automation Setup

This site updates the latest message without GitHub or any third-party automation service.

## Files

- `data/messages.json` stores the current latest YouTube videos.
- `cron/update-messages.php` refreshes `data/messages.json` from the Cornerstonedfw YouTube RSS feed.
- `local-overrides.js` reads `data/messages.json` and updates the homepage/messages video player.

## Hosting Cron

In cPanel or your hosting control panel, create a cron job that runs once per day or once per week.

Typical command:

```bash
/usr/local/bin/php -q /home/USERNAME/public_html/cron/update-messages.php
```

Replace `USERNAME` with the hosting account username and adjust `public_html` if the site is installed in another folder.

## YouTube Source

The updater uses this channel:

```text
UCH7sWvVfOAExYwitzdXcKTg
```

To change it later, edit `cron/update-messages.php` and replace the `$channelId` default value.

## Manual Refresh

You can also run the script from the hosting terminal:

```bash
php -q cron/update-messages.php
```

After it runs, refresh the site. The newest message will come from `data/messages.json`.
