LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-10-2005, 05:49 PM   #1
ginda
Member
 
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

thanx
 
Old 03-10-2005, 08:08 PM   #2
jonr
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:

Code:
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.
 
  


Reply



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 01:51 AM
how to run this cron job ashley75 Linux - General 5 05-24-2004 11:20 AM
shell script fo run auto job in cron JolynnMarie LinuxQuestions.org Member Intro 0 04-28-2004 11:21 AM
Did my Cron job run? ryedunn Linux - Newbie 2 02-25-2004 08:59 AM
Cron job does not run brentos Linux - General 6 12-12-2003 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:10 PM.

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