How to setup Cron Job

A sample program to setup a cron job

This cron is supposed to delete the spams from your mail box at specific time (at 12:10 pm).

Take this path

Home/username/mail/domainname/

Paste this path to this line….

10 12 * * * rm -rf /home/jbalipro/mail/domain.com/linkmaster/.spam/cur/*
10 12 * * * rm -rf /home/jbalipro/mail/domain.com/linkmaster/.spam/new/*

Go to spool/var/cron and there will be a file with that specific user on which your want to setup a cron job.

Go that file and open it in vi.
Paste the above line in that file and run the following command

Service crond restart

  • 147 Users Found This Useful
Was this answer helpful?

Related Articles

Protecting Yourself Against Viruses & Data Loss

It is vital to ensure your computer is protected from viruses and trojans. As well as installing...

What is Softaculous?

Softaculous is a wonderful option you can locate in your control panel. It allows you to install...

Static IP vs. Dynamic IP Address

A static IP address is one that remains fixed and never changes. The PC always sees the same...

I didn't get my cPanel login details after signup.

If you paid your order with Bitcoin, usually, it takes somewhere between 15 and 45 minutes to...

What are private nameservers and how do I set them up?

Private nameservers are where your domain points to our nameservers so that your customers do not...