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 Runing A Scheduled task (cron)

    Support
    2
    4
    214
    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.
    • affinity
      affinity last edited by affinity

      Hey there! I am a bit confused as to how to setup a cron in terminal. Or im assuming thats where you set it up.

      I am running a wordpress app and i need to setup a cron job to import data from google calander for a plugin. I was directed to the addon section of cloudron but am a bit confused as to where to run this code.

      Do I just paste it into my apps terminal after modifying the appropriate lines?

      After reading the overview it just points to this manifest page which is blank....

      Also for the schedule feild what would a correct line look like for running the task every 10 minutes? Link this?

            "import_google_events": {
                "schedule": "10 * * * *",
                "command": "//app/data/wp-content/plugins/modern-events-calendar/app/crons/g-import.php"
            }
        }
      

      Just looking for some direction on how to setup cron tasks! thanks!```
      code_text

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

        @affinity The addon section is meant for app packaging/developers and not for end users. The manifest cannot be change at run time, it is something that is set at compile time.

        The wordpress app already runs the WP cron event every 5 minutes. You can use a plugin like https://wordpress.org/plugins/wp-crontrol/ to add custom cron events inside wordpress itself. Does that work for you?

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

          Something like below to run every 10 seconds.

          af616301-521d-4f34-8807-6ba27f67c200-image.png

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

            That would work! Thank you for clarifying this for me. Cheers!

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