Author Topic: Schedule a scan  (Read 3089 times)

0 Members and 1 Guest are viewing this topic.

Offline joelw135

  • Jr. Member
  • **
  • Posts: 87
Schedule a scan
« 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.

Offline tumic

  • Avast team
  • Advanced Poster
  • *
  • Posts: 723
Re: Schedule a scan
« Reply #1 on: February 10, 2014, 01:27:54 PM »
You can do it the UNIX way by using cron and the command line scan utility.

Offline krahulik

  • Avast team
  • Sr. Member
  • *
  • Posts: 291
Re: Schedule a scan
« Reply #2 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/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>
« Last Edit: February 11, 2014, 11:29:30 AM by krahulik »