skip to Main Content

I schedule a new job on cronjob. But it’s not working. Is there any way to run cronjob in cpanel using commands.

4

Answers


  1. Go to CRON JOB option on your cpanle menus
    Set url like this and set time according to your functionality

    php /home/username/public_html/filename.php
    
    Login or Signup to reply.
  2. There is a bunch of way to running script with CRON. I do use this way on my web application most of the time when I need to use CRON.

    The first step is to choose a setting. The setting means when you want to run this script.

    and after then simply just use CURL with Cron to get this work properly like this: curl http://example.com/script.php on command box and click on the add button and whola! You have successfully added your first CRON Task.

    You may have a look at this picture below to get it properly
    Example uses Image

    Login or Signup to reply.
  3. Run it in putty

            • /usr/bin/php /var/www/html/project_name/artisan schedule:run 1>> /dev/null 2>&1 this is for laravel project
    Login or Signup to reply.
  4. you can simply use like this – /usr/local/bin/ea-php74 /home/username/domainname.com/script_path/yourfile.php

    replace username to your cpanel username, domain name to your domain name, script path where you want to run it, then replace the main file for corn job in yourfile.php

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search