Search Results

Search: Posts Made By: meister29
3,968
Posted By drysdalk
Hello, OK, here's a quick hacked-together...
Hello,

OK, here's a quick hacked-together version of a script that more-or-less does what crond would do. As Neo has mentioned however, this is not the best idea, as you're kind of needlessly...
3,968
Posted By drysdalk
Hi, In that case, you'd really be into the...
Hi,

In that case, you'd really be into the territory of literally re-inventing crontab. For example, you could define an input file format that consisted of runtimes and their associated...
3,968
Posted By drysdalk
Hi, Using the approach from my script, you...
Hi,

Using the approach from my script, you would just tweak the runtime variable accordingly. For instance, in the provided example:


runtime=`/usr/bin/date -d '2019-08-09 14:22:00' +%s`

...
3,968
Posted By Raghav_Singh
You can use loop to run on a specific time of...
You can use loop to run on a specific time of day:
#!/bin/bash

while true;
do
TIME=`date | cut -d' ' -f4`
echo $TIME
if [[ $TIME == "22:00:00" ]]
then
`your...
3,675
Posted By MadeInGermany
Make your function return an exit status. Act...
Make your function return an exit status.
Act on the exit status.

if [ - e test.xt ]
then
echo "exist"
return 0
else
echo "not exist"
return 1
fi
For practical reason in the...
2,834
Posted By drysdalk
Hello, Yes, that's correct - this error...
Hello,

Yes, that's correct - this error means that the user myuser is not allowed to run the su command via sudo. That's not unusual, and in fact is generally good practice. If you let regular...
2,834
Posted By drysdalk
Hi, As Neo has said, the most likely...
Hi,

As Neo has said, the most likely explanation here is that myuser has a valid shell set in /etc/passwd, whereas webuser does not.

Witness the following example:


# finger -l unixforum...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 03:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy