Cron
Introduction #
There are times when one must require cron to do specific tasks. This article will help you just do that. Keep in mind that this cron is limited only inside the WordPress container.
Custom #
Both the WordPress and OLS containers have been designed to load user defined cron via a custom file located at /etc/demyx/custom/cron
. We first need the value of the cron interval and we can get that from Crontab.guru. For this example, I will be using the every minute interval.
First we need to create the custom cron file.
demyx exec <app> vi /etc/demyx/custom/cron
Press i
Enter the desired cron interval(s) and command(s).
* * * * * <command> <path>
* * * * * <command2> <path2>
* * * * * <command3> <path3>
Save and exit.
Press esc
Press :wq
Press enter
Restart the WP container to take effect.
demyx compose <app> -w restart
Conclusion #
Need further help or just want to hangout and chat, we have multiple channels for you to visit. To show support for this project, please consider buying coffee.
- Email – [email protected]
- Discussions – https://demyx.sh/discussions
Join us on Discord for latest news, faster support, or just chill.
Support this project by buying coffee (please).