Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion RHEL/CentOS
  • Search

auto clear cache cronjob problem

RHEL/CentOS related topics
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
Teo
Posts: 97
Joined: Mon May 11, 2015 9:17 am

Os: CentOS 6x
Web: apache + nginx
auto clear cache cronjob problem
  • Quote

Post by Teo » Fri Jul 26, 2019 9:39 am

Hello everyone!

I'm trying to add this cronjob:

Code: Select all

sudo /usr/bin/bash /home/clearcache.sh
user is Admin allowed to run bash, Centos6 the file clearcache.sh (permission 755) contains:

Code: Select all

#!/bin/bash
# Note, we are using "echo 3", but it is not recommended in production instead use "echo 1"
echo "echo 3 > /proc/sys/vm/drop_caches"
the error I get is:
sudo: no tty present and no askpass program specified
I tried this but it doesn't work:
viewtopic.php?t=17707

any thoughts?
thank you!
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: auto clear cache cronjob problem
  • Quote

Post by skamasle » Wed Jul 31, 2019 3:03 pm

That system you use ?

Why not run this specific crons with root user ?
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “RHEL/CentOS”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password