Run a /scripts script through cron
I want to run the /scripts/generate_maildirsize as a cronjob, but can't figure out what command to put in the tab. Can anyone help me figure this one out? Thanks!
-
@ czerdrill, Ary you trying to run .php or other extension file. If so, mention the location. for example if you are going to run the .php file in cron you should mention the php path then file name like below. 0 13 * * * /usr/local/bin/php /home/xxxx/public_html/cron/newsletter/index.php 0 -
]I want to run the /scripts/generate_maildirsize as a cronjob, but can't figure out what command to put in the tab. Can anyone help me figure this one out? Thanks!
Hello :) What method are you using to create the cron job? You could use "crontab -e" to add it directly as a root cron job via the command line. Thank you.0 -
]Hello :) What method are you using to create the cron job? You could use "crontab -e" to add it directly as a root cron job via the command line. Thank you.
Hi Michael, I may have not been clear. It's one of the cpanel predefined scripts namely the generate_maildirsize. I tried adding /scripts/generate_maildirsize to the crontab and when it runs it says no such file or directory. I'm trying to make whatever that script does (which is regenerate the maildirsize file) run as a cron job but I don't know what command to enter into the crontab. Any ideas?0 -
Are you adding this as a root cron job? If so, please post the exact cron job entry that you used. Also, what error do you see in /var/log/cron when it runs? Thank you. 0
Please sign in to leave a comment.
Comments
4 comments