Plesk Hosting
How to Setup Cronjobs in my Webhosting?
I recently starts some email marketing campaigns. We choose a email marketing software named PHPKode Newsletter X. Everything is well but it’s Cronjobs Configuration.
It tells me this in their site,
“The setup processe of a cronjob depends on the hosting software you are using (Plesk, cPanel). Then add the commands bellow.
wget -O – -q -t 1 http://demo.phpnewsletter.org/newsletter_sendmail.php?key=hZwtPALP&user_id=1″
I use a webhosting in HostGator, so anyone tell me how i can setup this cronjobs correctly?
You can find the configuration at their demo site http://www.phpnewsletter.org
well first create a shell script, just a text file with the extension ‘.sh’
it should look like this inside:
#!/bin/sh
wget -O – -q -t 1 http://demo.phpnewsletter.org/newsletter_sendmail.php?key=hZwtPALP&user_id=1
then you need to run as a privileged user: chmod +x nameOfScript.sh
then you want to run: crontab -e
if you don’t already have one it will make one for you, I suggest you use nano since its the easier text editor.
and add this to it:
minute hour day-of-month month day-of-week /path/to/shell/script.sh
you need to fill in the minute, hour, day, month with values depending on how often you want the script to run. for example if you want it to run at 10 PM on mondays it would look like:
0 22 * * 1 /path/to/shell/script.sh
once you are done press ctrl+o to save your crontab and then ctrl+x to exit the nano text editor
EDIT:
and the asterisk values in the crontab mean “all possible values”
Hosting Websites With Plesk (Part 1 of 2)