Avast WEBforum

Consumer Products => Avast Mac Security => Topic started by: joelw135 on February 09, 2014, 06:04:44 PM

Title: Schedule a scan
Post by: joelw135 on February 09, 2014, 06:04:44 PM
Has anyone figured out how to bypass the ability to schedule a scan in Avast Free for Mac? An app or a automator action would be helpful.
Title: Re: Schedule a scan
Post by: tumic on February 10, 2014, 01:27:54 PM
You can do it the UNIX way by using cron and the command line scan utility.
Title: Re: Schedule a scan
Post by: krahulik on February 11, 2014, 11:25:27 AM
Cron skips a job execution, when the computer is asleep. The easiest way is to instruct a launchd to run the avast! application with a scanned directory as a parameter https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html), https://developer.apple.com/library/mac/documentation/macosx/conceptual/bpsystemstartup/Chapters/ScheduledJobs.html (https://developer.apple.com/library/mac/documentation/macosx/conceptual/bpsystemstartup/Chapters/ScheduledJobs.html).

Create a plist file as below in ($HOME)/Library/LaunchAgents folder and logout/login.
~/Library/LaunchAgents/com.avast.schedule.plist (launches each Tuesday at 11:14AM):
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.avast.schedule</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/avast!.app/Contents/MacOS/avast!</string>
<string>~/Downloads</string>
</array>
<key>EnableGlobbing</key>
<true/>
<key>StartCalendarInterval</key>
<dict>
        <key>Hour</key>
        <integer>11</integer>

        <key>Minute</key>
        <integer>14</integer>

        <key>Weekday</key>
        <integer>2</integer>
</dict>
</dict>
</plist>