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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Crontab in Wordpress (managed) app

    WordPress (Managed)
    wordpress cron
    3
    4
    156
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • yusf
      yusf last edited by girish

      I know there's wp_cron in the Wordpress app but can we have cron/crontab too?

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        Wordpress uses the Cloudron cron addon to spin up cron tasks in a separate container, the schedule for this is every 5 minutes.

        Basically what it calls is exec /usr/local/bin/gosu www-data:www-data /app/code/wp cron event run --due-now

        1 Reply Last reply Reply Quote 0
        • yusf
          yusf last edited by

          So can I use that to schedule regular shell commands?

          1 Reply Last reply Reply Quote 0
          • girish
            girish Staff last edited by

            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).

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB