plesk / ext-website-virus-check

Check your websites for viruses automatically using multiple anti-virus engines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the command to execute via cron for daily scan?

gbot opened this issue · comments

commented

Hi there,

If I wanted to set up a cron task to scan all Plesk sites daily, what is the command I need to execute?

Thanks.

Hello,

There is already a scheduled task which continuously scans the domains: https://github.com/plesk/ext-website-virus-check/blob/master/plib/scripts/post-install.php#L14

It's launched each hour and processes a bunch of domains. Here you can find how many domains to process per hour and per day: https://github.com/plesk/ext-website-virus-check/blob/master/plib/library/Helper.php#L11

commented

Thanks very much for your response.

Should that task display in the Plesk Panel -> Settings -> Scheduled Tasks?

Because, on my Plesk 17.5.3 install that I'm testing there is no such task listed.

Thanks again for your help.

Yes, it should be there.

commented

Hi again,

Well, I'm not sure what's going on, but the Scheduled Tasks job doesn't get created on my install.

I've got Crontab shell set to /bin/bash in Scheduled Tasks -> Settings.

Just tried an uninstall / reinstall.

Still no scheduled task is created.

I wouldn't have thought it would affect it, but I have "Scheduler management" disabled in all Service Plans -- I don't allow any client access to scheduled tasks or any kind of shell, but I assumed that this extension is only an Admin function anyway.

Hello,

Just to clarify there are 2 ways how to get to Scheduled tasks:

  1. Login as admin and go to Tools&Settings > Scheduled Task. Here you'll see all scheduled tasks on the server including tasks under root user.
  2. Login as any account and click Scheduled tasks in right sidebar on Websites&Domains. Here you'll see only scheduled tasks under webspace system user.

Which way do you use?

commented

I use method #1

Scheduled Tasks is not available for webspace system users (#2)

Have you tried to remove and install extension again? It'll require to activate your domains one more time.

commented

Yes, after switching Crontab Shell to bin/bash in Scheduled Tasks Settings, I then removed and reinstalled the extension. No difference.

What do you mean by "require to activate your domains one more time"?

Thanks very much for your help.

commented

To clarify, I have been able to scan sites successfully -- although the task does time-out after a while with a "task not responding" type message in Plesk Panel notification.

It's just that the Scheduled Task is not created.

What do you mean by "require to activate your domains one more time"?

The extension stores which domains you selected to scan (you select them via checkbox and click Enable). When you remove the extension and install again it will forget which domains were selected and you'll just need to select them one more time.