1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Webmin] Setup WebEngine Cron Job

Discussion in 'Tips & Guides' started by Lautaro, May 6, 2013.

  1. Lautaro

    Lautaro Administrator Developer

    Hi,

    Since WebEngine 1.0.4 has its own cron job system, you will only have to setup one cron job and the web will take care of the rest. Just follow the above steps in order to create a cron job using Webmin.

    Step 1:
    If you are not sure what's the path to your WebEngine powered website files, then go to Others > File Manager. Use the file manager to navigate through CentOS's directories and find your website's path to the cron.php file inside the "cron" folder.

    By default, your websites should be stored in: /var/www/html/

    Image:
    cron1.jpg








    Step 2:
    Once you have the full path to the cron.php file, go to System > Scheduled Cron Jobs, then click "Create a new scheduled cron job."

    Image:
    cron2.jpg








    Step 3:
    Now, this is the part where you get to setup the cron job.

    Set the "Execute cron job as" setting to apache.
    Set the "Command" setting to: /usr/bin/php -q /var/www/html/......../cron/cron.php

    Make sure you edit it with your own path!

    And finally, check the radio button "Times and dates selected below ..". This will make the cron job to run every single minute of every hour, allowing WebEngine to manage its own cron jobs.

    Image:
    cron3.jpg

    When you finished simply click on the "Create" button and you will be done!

    Regards,
    Lautaro.
     
    Netzo likes this.
  2. A$$kicker

    A$$kicker Customer Customer

    how about windows user where to setup ?
     
  3. Netzo

    Netzo Customer Customer

    I'd like to know how to set it up without webmin, using CentOS 6.2 :p
     
  4. Lautaro

    Lautaro Administrator Developer

    Netzo likes this.
  5. A$$kicker

    A$$kicker Customer Customer

    On Windows OS there is no cron ....
     
  6. Netzo

    Netzo Customer Customer

    However there is Scheduled Task Manager ;) Lautaro has provided the links.

    Thank-you Lautaro :)

    I've tried the crontab, is there something wrong with my line?
    Code:
    1 * * * * root /var/www/html/massacremu.net/cron/cron.php
    ''etc/crontab''
    Because it is not running the cron for webengine :)
     
    Last edited: Feb 26, 2014
  7. A$$kicker

    A$$kicker Customer Customer

    can any one do proper guide for windows please , so dam confuse unlike mucore
     
  8. Lautaro

    Lautaro Administrator Developer

    Here's a guide with images:
    http://www.sevenforums.com/tutorials/12444-task-scheduler-create-new-task.html

    It's extremely easy, just follow the steps of the link above and then customize the scheduled task to run every 5 minutes. All the options and buttons in the task scheduled are very easy to use and self-explanatory.

    That's because MuCore doesn't have a cron system like WebEngine's. Mucore runs the queries when a user visits your site, while WebEngine runs the crons in a command window on the server-side. That way the web will not get slower for any user while running a cron.
     
    ianvalls90 likes this.
  9. Netzo

    Netzo Customer Customer

    Please some explanation for linux, Lautaro :) I have no idea why it's not working :Ss
     
  10. A$$kicker

    A$$kicker Customer Customer

    fuck it i gave up, nothing work.
     
  11. Lautaro

    Lautaro Administrator Developer

    On windows you don't have to run cron.php, but cron.bat which is included in every release, in the "extra" folder.

    You'll have to edit with notepad the cron.bat file and type the correct full path to your cron.php file. Then you can add the scheduled task so it runs the cron.bat every 5 minutes.
     
    A$$kicker likes this.
  12. Netzo

    Netzo Customer Customer

    Hey Lautaro, am I being ignored here? ;s
     
  13. Lautaro

    Lautaro Administrator Developer

    No mate, I just haven't had much time lately to check the issue your having. If you're not a very experienced user with linux systems you should use a panel like cPanel or Webmin to make things easier.
     
  14. Netzo

    Netzo Customer Customer

    You were always a busy man, I understand :) I've removed Webmin since I got hacked through it but I will try cPanel, thanks :)
     
  15. Ricardas

    Ricardas New Member

    In 1.0.9 package, there is absolutely no cron.bat among the files, there is no Extra folder either. I've used cron.bat from version 1.0.8 but it is hardly viable. I set my task scheduler to do a task running the cron.bat but it runs it once and then when it tries running cron.bat after like 10 minutes, the cmd window appears with all the content of cron.bat and it basically gets stuck and the cron jobs do not update. Am I missing something here?
     
  16. Lautaro

    Lautaro Administrator Developer

    I develop and test WebEngine on a linux environment only, so since the 1.0.9 update I dropped all support for windows platform. That being said, it's not impossible to setup the cron system on windows, just google something like "xampp php cron setup windows" or you can use something like www.cron-job.org to run the cron jobs for you; you'd only need to create a file in WebEngine's main directory and run the cron job from there.
     
  17. Murry

    Murry New Member

    Sometimes external cron job service like https://www.easycron.com built with many enhanced features is handy for use and powerful too.
     

Share This Page