Write some Software

I want to simulate User growth on my website

So I need a cron job on my linux webserver that executes a shell script that retrieves a value from my local mysql table, adds a number to it and writes it back. The cron should run all 5 minutes.

For adding the number, there should be a function with the following parameters:

1. probability that number should be added (like tossing a coin).

if prob = 1, number will be added 100% sure

if prob = 0, nothing happens, no number will be added

if prob = 0.5, number will be added with a 50% probability. Means, assuming the script runs every 5 minutes, number would be added roughly every second run of the cron.

etc. etc.

2. size of number: should be random number. Range should be defined by upper and lower bound.


var_prob = 0.5;

var_upper = 50;

var_lower = 10;

function determine_if_number_should_be_added(prob) as boolean {

out = calculate(prob);


if (determine_if_number_should_be_added(prob) == TRUE) {

number_to_add = generate_random_number(var_lower, var_upper);

old = mysql(retrieve value)

new = old +number_to_add;



Skills: Linux, MySQL, Shell Script

See more: calculate and write, bound table, example shell script, software defined, prob, write linux script, mysql function update, linux shell script update mysql, write linux shell, mysql update function, shell script mysql, script parameters linux, software cron, range mysql script, mysql shell script, run parameters shell script linux, retrieve shell, linux shell parameters, mysql boolean, linux write, random number range, linux shell script mysql, random number software, shell script linux, linux shell script

About the Employer:
( 6 reviews ) Z├╝rich, Germany

Project ID: #5945846