Because the search servlet has been moved has a quartz job now it's trickier to call from a crontab but still possible and here is the command that needs to be put in the crontab:
wget --no-check-certificate --wait=5 "http://${server_name}/c/portal_public/login?my_account_cmd=auth&my_account_login=${user_login}&password=${password}" "http://${server_name}/c/portal/protected" "http://${server_name}/c/portal/j_security_check?j_username=${user_id}&j_password=${encrypted_password}" "http://${server_name}/dotScheduledJobs?clazz=com.dotmarketing.quartz.job.BuildSearchThread"
That wget will login in and then execute the dotScheduledJobs that executes the BuildSearchThread quartz job, one thing you need to do before executing that command is replace the variables within it, like ${server_name} with the server name like testing.dotcms.org, the ${user_login} with an admin login like test@dotcms.org, the ${password} with that users password, the ${user_id} with that user id and the ${encrypted_password} with the encrypted password you can find in the database table user_
You can use the attached script (just make sure to pass all 5 arguments):
./search_servlet.sh SERVER_NAME USER_LOGIN USER_ID PASSWORD ENCRYPTED_PASSWORD
Post a Comment