scriptRunning() Netscript Function¶
-
scriptRunning(scriptname, hostname)¶ RAM cost: 1 GB
Arguments: - scriptname (string) – Filename of script to check. case-sensitive.
- hostname (string) – Hostname of target server.
Returns: trueif any script with that file name is running on that server.This is different than the isRunning function because it does not try to identify a specific instance of a running script by its arguments.
Examples:
The example below will return true if there is any script named
foo.scriptrunning on thefoodnstuffserver, and false otherwise:scriptRunning("foo.script", "foodnstuff");
The example below will return true if there is any script named
foo.scriptrunning on the current server, and false otherwise:scriptRunning("foo.script", getHostname());