|
Is it possible to run Perl script (vas.pl) with shell sript inside (date.sh & backlog.sh) in cron or vice versa? Thanks.
0 19 * * * /opt/perl/bin/perl /reports/daily/scripts/vas_rpt/vasCIO.pl 2> /reports/daily/scripts/vas_rpt/vasCIO.err
Error encountered...
Started by Cez on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Consider fully....
Personally, I run a simple shell script from cron and let it deal with all the complexities; I don't/passwd file.
So, your script didn't find 'date.sh' because it wasn't.
Profile has not been run, for example.
|
|
I'm trying to write a bash script (in Ubuntu) that will backup a directory using tar.
How can I do a check in the script so that it can only be run as root (or with sudo)?
For instance, if a user runs the script, it should say that this script must be...
Started by Cory Plastek on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at serverfault):
What is your objective here, to inform the user that they should run the script as root" ] then echo "\nPlease run script as root." exit 1 fi
To pull the effective uid use this command:
id -u
If the result is ‘0’ then the....
|
|
I have a number of scripts used to build a database. These need to be executed in a certain order. Is it possible to create a script to run other scripts in SQL Developer (1.5.3)?
I know I can do this with sqlplus, but I was hoping there's a similar ability...
Started by chris on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Argn
or
@"/path/to/directory/script" arg1 arg2 ...
With run script ):
@script arg1 arg2 ...
|
Ask your Facebook Friends
|
I need to change the server date by running a bash script called by php. When i invoke the bash script from shell it works, but if i call it via php then it doesn't work. The bash script is run as root.
php script code:
<?php $time = $_POST['input_...
Started by Tutul on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
If you run a script as root, it will run as the root user unless you use some commands to make/questions/556194/calling-a-script-from-a-setuid-root-c-program-script-does-not-run-as-root
running the PHP....
|
|
How can you get the directory of the script that was run and use it within the .cmd file?
Started by Brian R. Bondy on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
This is equivalent to the path of the script:
%~dp0.
Archive/2005/01/28/362565.aspx#362741
This covers the use of %~dp0.
|
|
How do I make python (local) run php script on a remote server ?
I don't want to process its output with python script or anything, just execute it and meanwhile quit python (while php script will be already working and doing its job).
edit: What I'm ...
Started by Phil on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Import subprocess def php(script_path): p = subprocess.Popen(['php', script_path] )
If python is on a different physical....
Paraphrase the answer to http://stackoverflow.com/questions/1060436/how-do-i-include-a-php-script-in-python .
|
|
Running Fedora 9/10, Apache 2, PHP 5...
Can I run a shell script as root, from a PHP script using exec()?
Do I just give Apache root priveleges, and then add "sudo" in front of them command?
Specifically, I'm trying to start and stop a background script...
Started by SkippyFire on
, 7 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Even then, it poses a security risk, because anyone....
Your shell script).
Why run the script as root anyways?
I'm not professional the apache user to that single command you wish to run (i.e.
That would be huge security risk.
|
|
How would I go about running a php script when I pressed say an "update" button, in which then it would run say script x1.php (which has no echo's or or other output, successes or failed) then update the current page (I know the update part can be done...
Started by Mint on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Response) { // update code for your page } }); }
This will run your script in the background and then you="button" onclick="go();" value= "Update" /> function go() { $.ajax( { type: "POST", url: "script x1.php", data: data, //....
|
|
How can I run several PHP scripts from within another PHP script, like a batch file? I don't think include will work, if I understand what include is doing; because each of the files I'm running will redeclare some of the same functions, etc. What I want...
Started by Charles on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
For example, your script could do:
<?php exec('php -q script1.php'); exec('php -q script2.php'); ?>
Exec has some until termination of the process to keep....
You could use the exec() function to invoke each script as an external command.
|
|
Say a ruby script is running
ruby.rb SOMEUSERID
using PHP, how can i find out whether something exactly like that is currently running or not ? Currently i am using PID to check but im not sure if this is efficient. What if there are lot of users running...
Started by gpwu on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Parse output from 'ps ax' perhaps
I don't like the idea but you can do this on linux
exec('ps -A | grep ruby.rb', $output);
not sure what's about other systems. .
|