Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

run cron job as specific user

# Crontab Running as a Specific User
# From root's crontab sudo crontab -e, you can use:
1 1 * * * su username -c "/path/to/your/script.sh"
Comment

run cron job as specific user

# Crontab Running as a Specifi User
# Through Command Line, you use the User's Actual crontab like this:
sudo crontab -u username -e
Comment

run cron job as specific user

# Crontab Running as a Specific User
# Only /etc/crontab and the files in /etc/cron.d/ have a username field. In that file you can do this:
1 1 * * * username /path/to/your/script.sh
Comment

PREVIOUS NEXT
Code Example
Shell :: openjdk-17-jdk 
Shell :: how to push your code to github 
Shell :: how to execute script and pass a parameterin linux 
Shell :: get date windows batch 
Shell :: git create new repo from branch 
Shell :: how to set environment variables in linux 
Shell :: mirror repository github 
Shell :: dir command list all files and subdirectories 
Shell :: bash do-while 
Shell :: create a new file in bash script 
Shell :: add line to beginning of file shell script 
Shell :: bash compare numbers 
Shell :: mv command in linux 
Shell :: curl with regex 
Shell :: git squash command 
Shell :: gitlab ci echo variable 
Shell :: cocoapods 
Shell :: IDE for work marckdown file on ubuntu 
Shell :: how to start xfce4 sudo command 
Shell :: bash split pipe output by delimiter 
Shell :: connect to remote redis over tls 
Shell :: how to add new line to each line 
Shell :: how to send commangds to gitbash from cmd 
Shell :: bash leerzeichen entfernen 
Shell :: ag ignore directory 
Shell :: force fsck debian 
Shell :: Zim files from command prompt 
Shell :: fetch only one branch 
Shell :: github url not showing 
Shell :: how to use migrate guru plugin 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =