How to set up a cron job on a site that's protected with .htaccess/.htpasswd?

To set a cron job on a website which is protected with .htaccess/.htpasswd password protection,

instead of setting cron job as

wget -O - -q -t


curl --compressed

Set the cron job as below

curl -u admin:PassworD --silent --compressed

In the above cron, we have specified  .htaccess /.htpasswd protection. details where username is admin and password is PassworD

That's all..

Share on Facebook2Share on Google+4Tweet about this on Twitter0Share on StumbleUpon0Share on LinkedIn0Share on Tumblr0Digg thisPin on Pinterest0Share on Reddit0Email this to someonePrint this page

About Abhijit Sandhan

Abhijit Sandhan
Loves Linux, Blogging, Traveling, Hiking and sharing knowledge!

One comment

  1. it worked.. thanks

Leave a Reply

Your email address will not be published. Required fields are marked *