[SOLVED] Create cronjob

Dear My friend ,
Accordingly am newbie on this system and I would like to create a cronjob for the hourly send spamreport mail ,
I've used this code " 0 8-18 * * 1-5 /usr/bin/pmgqm send " but it's return this error " -bash: 0: command not found "
Ekran Alıntısı.JPG
what problem where do I ?

Thank you for your helps.
 
hi,

I've used this code " 0 8-18 * * 1-5 /usr/bin/pmgqm send " but it's return this error " -bash: 0: command not found "
you need to put that in a file inside /etc/cron.d/ directory

you can run this command to do that:
Code:
echo "0 8-18 * * 1-5 root /usr/bin/pmgqm send" > /etc/cron.d/spamreport

hope this helps!
 
hi,


you need to put that in a file inside /etc/cron.d/ directory

you can run this command to do that:
Code:
echo "0 8-18 * * 1-5 root /usr/bin/pmgqm send" > /etc/cron.d/spamreport

hope this helps!
I've tried today but couldn't receive anymail of them ,I've created a file of the directory on " /etc/cron.d/ " as the name " directory , So , I wrote the this code inside " echo "0 8-18 * * 1-5 root /usr/bin/pmgqm send" > /etc/cron.d/spamreport " .

Bugün tüm gün test ettim fakat bekleyen spam listesindeki kişilere hiçbir mail gitmedi.
/etc/cron.d/ dizininde directory isminde dosya açtı , içerisinide " echo "0 8-18 * * 1-5 root /usr/bin/pmgqm send" > /etc/cron.d/spamreport " bu kodu yapıştırdım. Doğru değil mi ?
 
I've tried today but couldn't receive anymail of them ,I've created a file of the directory on " /etc/cron.d/ " as the name " directory , So , I wrote the this code inside " echo "0 8-18 * * 1-5 root /usr/bin/pmgqm send" > /etc/cron.d/spamreport " .

Bugün tüm gün test ettim fakat bekleyen spam listesindeki kişilere hiçbir mail gitmedi.
/etc/cron.d/ dizininde directory isminde dosya açtı , içerisinide " echo "0 8-18 * * 1-5 root /usr/bin/pmgqm send" > /etc/cron.d/spamreport " bu kodu yapıştırdım. Doğru değil mi ?


in the end the file should look like this:
Code:
0 8-18 * * 1-5 root /usr/bin/pmgqm send

and be located in /etc/cron.d/ directory, for example /etc/cron.d/spamreport

if that doesn't work then you can check the output of your journalctl and look for spamreport to see if the cron job caused any error or failed.