PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

# Hourly pass of imunify-manual-handler, the runner of feature-flag-gated one-off jobs:
# pkg-update (pkg_update_bypass flag), cron-restore (no flag: it restores only what dpkg proves
# missing) and the SC malware clean-up. The clean-up cleans by
# default. The feature flag sc_cleanup_prevent holds a host back: with it the run changes none
# of the host's files (it still truncates our own quarantine), reports nothing to Sentry and
# only publishes its counters (dry_run=1).
# Kill switch for every plugin: touch /var/imunify360/manual-handler.disabled
# nice/ionice, not run-with-intensity: on CloudLinux that tool resets LVE 255, which the agent's
# malware scans share, to this job's limits and throttles every scan running at the time
# (DEF-57287). The values are the ones its nice backend uses for intensity 2.
7 * * * *   root   test -x /usr/libexec/imunify-manual-handler && nice -n 5 ionice -c 2 -n 5 -t /usr/libexec/imunify-manual-handler --splay 30m >/dev/null 2>&1
