[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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!