Cron job

How do I set up a Cron job?

In

/etc/crontab

If you have no experience with setting up cron jobs on servers, you can use a webcron like Easycron.com who will call your URL at a specific time.

hi,
i was setup crontab in web admin and crontab run command PHP in cli but error,
-bash: php: command not found
can you help me ?
Sorry my english not good

@tonyquach said:
hi,
i was setup crontab in web admin and crontab run command PHP in cli but error,
-bash: php: command not found
can you help me ?
Sorry my english not good

Did you setup PHP binary to be accessible globally?

cp /usr/local/lsws/lsphp71/bin/php /usr/bin/

Or for PHP 7.2

cp /usr/local/lsws/lsphp72/bin/php /usr/bin/

@usmannasir said:

@tonyquach said:
hi,
i was setup crontab in web admin and crontab run command PHP in cli but error,
-bash: php: command not found
can you help me ?
Sorry my english not good

Did you setup PHP binary to be accessible globally?

cp /usr/local/lsws/lsphp71/bin/php /usr/bin/

Or for PHP 7.2

cp /usr/local/lsws/lsphp72/bin/php /usr/bin/

@usmannasir said:

@tonyquach said:
hi,
i was setup crontab in web admin and crontab run command PHP in cli but error,
-bash: php: command not found
can you help me ?
Sorry my english not good

Did you setup PHP binary to be accessible globally?

cp /usr/local/lsws/lsphp71/bin/php /usr/bin/

Or for PHP 7.2

cp /usr/local/lsws/lsphp72/bin/php /usr/bin/

Hi, Thanks, i was install it

problem to set cron via CyberPanel

problem to set cron via CyberPanel

Details?

hello, help me, i dont know how setting cron job command in cyber panel ?

hello, help me, i dont know how setting cron job command in cyber panel ?

http://docs.cyberpanel.net/doku.php?id=setup-cron-job

Hello, I have a list with 15 commands to add to the cron job, would it be easy for me to import these commands without having to add one by one on the panel?
Because every installation of a website that I make in the panel I have to manually add row by row by panel.

Hello, I have a list with 15 commands to add to the cron job, would it be easy for me to import these commands without having to add one by one on the panel? Because every installation of a website that I make in the panel I have to manually add row by row by panel.

From the interface, it is only possible to add them one-by-one for now.

yum install cronie
/var/spool/cron/root

@rafaelmarrichi said:
Hello, I have a list with 15 commands to add to the cron job, would it be easy for me to import these commands without having to add one by one on the panel?
Because every installation of a website that I make in the panel I have to manually add row by row by panel.

Cron UI doesn’t has custom cron index or database but it fetches directly from crontab. So, you can add it via ‘crontab -u user -e’. Let me know if you are looking for a bash script for adding commands.

I’m having trouble creating Cron Job for WHMCS, I’ve added it via CyberPanel, and directly in crontab, but unfortunately it does not work.

@usmannasir I could not configure PHP binary to be globally accessible because I did not understand what should be done.

I need to add this cron job: */5 * * * * php -q /home/website.com/whmcsdata/crons/cron.php
Could someone help me make it work?

I managed to fix. There was no problem with the server or CyberPanel. It was just the address of the cron configuration file (crons/config.php) that still had the old server address.

Hi, I need to write a script on how to use mysqldump on cron job. I want to backup my database, but somehow failed.

I tried a command like this; / usr / bin / mysqldump -u root --password = passstring dbname> /home/sitename.com/public_html/dbackupTEST.sql

also;
mysqldump -u root --password = passstring dbname> /home/sitename.com/public_html/dbackupTEST.sql

I tried this way but it didn’t work.

Can you help me?

Do you get any error?

I solved the problem as follows,
mysqldump -u root -pPASSWORD dbname | gzip -9> /home/sitename.com/public_html/storage/dbackup_$(date +% d-% m-% Y) .sql.gz

Hi,

I tried to create cron job from admin panel of cyberpanel but it is not working

I have tried below

          • /usr/bin/php /home/crm.zsellers.com/public_html/vtigercron.php
          • bin/sh /home/crm.zsellers.com/public_html/cron/vtigercron.sh
          • /usr/bin/php -q /home/crm.zsellers.com/public_html/vtigercron.php
          • /usr/bin/php -f /home/crm.zsellers.com/public_html/vtigercron.php
          • /php /home/crm.zsellers.com/public_html/vtigercron.php
          • /php -q /home/crm.zsellers.com/public_html/vtigercron.php
          • /php -f /home/crm.zsellers.com/public_html/vtigercron.php
          • /home/crm.zsellers.com/public_html/vtigercron.php

Please help me in this .

Thanks in advance