How Can I Add This cron job?
How Can I Add This cron job?
Hello,
Currently I'm running vestacp on ubuntu 16.04 LTS
Now, I need to add this cron job for my wordpress website
How I can add this?
Thanks :)
Currently I'm running vestacp on ubuntu 16.04 LTS
Now, I need to add this cron job for my wordpress website
How I can add this?
Code: Select all
#!/bin/bash
# get the list of proxies from AWS
IPS=`curl -s http://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips | jq -r '.[][]'`
# use wp-cli to update WordFence config in database
cd httpdocs
wp db query "UPDATE wp_wfconfig SET val = '$IPS' WHERE name = 'howGetIPs_trusted_proxies';"
# remove the WordFence config cache so the new IPs will be read on next page load
rm wp-content/wflogs/config-synced.php
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: How Can I Add This cron job?
Create .sh file with this code, for example cron.sh
Make chmod +x cron.sh
Then just add cron job with call this file.
Make chmod +x cron.sh
Then just add cron job with call this file.