Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-10-2005, 06:49 PM   #1
Registered: Mar 2004
Distribution: SUSE8.2, 9.2, Knoppix
Posts: 323

Rep: Reputation: 31
How to write a script to run bitdefender antivirus as a cron job?

i like using bdc to scan for viruses but i would like to auto scan the hard drive using cron, ive had a look at the man pages but im abit lost.....any help or example scripts would be great

Old 03-10-2005, 09:08 PM   #2
Senior Member
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
You don't need a script: You just need to edit your crontab file, and to do that, you simply go:

crontab -e
as root.

The format is simple. Below is mine for running a mailscan using bitdefender every day:

35 12 * * * /usr/bin/mailscan

I have a one-line "script," if you want to glorify it with that name, that simply tells bitdefender only to check the mail files. That's what the /usr/bin/mailscan part refers to.

The numbers and asterisks mean: run it at 35 MINUTES past the hour of 12 NOON every day of every week of every month. (The asterisk is the typical wild-card thing, meaning "every.")

It's as simple as that: minute, hour, day, week, month. Then what you want done. Voilą!

Hope this helps.

Note that you MUST run crontab -e to edit the crontab. It's the only way it will "take."

It will very nicely tell you, too, if you make a mistake, which is a big plus. That way you won't have a bad crontab file without knowing it.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to run cron job fahad26 Linux - General 3 06-30-2005 02:51 AM
how to run this cron job ashley75 Linux - General 5 05-24-2004 12:20 PM
shell script fo run auto job in cron JolynnMarie Member Intro 0 04-28-2004 12:21 PM
Did my Cron job run? ryedunn Linux - Newbie 2 02-25-2004 09:59 AM
Cron job does not run brentos Linux - General 6 12-12-2003 03:37 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration