Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Crontab in Wordpress (managed) app

    Moved Solved WordPress (Managed) wordpress cron
    4
    0 Votes
    4 Posts
    1k Views
    girishG
    There's a bunch of plugins like WP Crontrol, Advanced cron, Simple cron. You can use them to setup a custom pattern and call a custom function. Your PHP function can just shell exec your script (or maybe you can even write PHP depending on your use case).
  • How to add cronjob to running cloudron app?

    Solved Support cron
    5
    1 Votes
    5 Posts
    3k Views
    girishG
    As others said, usually the cron job is part of the app itself. If for some reason you want to run some cron task outside the scope of the app, then you can use a script like below and put it in the crontab of your server. #!/bin/bash # this is the app's domain name app="test.smartserver.space" # detect the container id of the app container_id=$(docker ps -q -f label=fqdn=$app -f label=isSubcontainer=false) echo "App container id is : $container_id" # we can now run arbitrary commands in the container. below we run a command as the www-data user. docker exec $container_id sudo -u www-data ls -l