how to create cron job with date parameters

Started by alireza_salehi, January 14, 2020, 07:29:25 AM

Previous topic - Next topic

alireza_salehi

hi
i want to create cron job like this from user panel:

mysqldump -u uuuu -pxxx --default-character-set=utf8 myuser_db | gzip > /home/myuser/backups/db-`date +\%Y\%m\%d-\%H\%M`.sql.gz

but date parameters never works and i see db-{Q3}.sql.gz in output folder,
how can i create a cron job inside user panel with date parameters and formatting?

Igor S.

Try to run the command in the console and check what happened.  I suppose, you have to use double quotes in the path. "/home/myuser/backups/db-`date +\%Y\%m\%d-\%H\%M`.sql.gz"



You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services