Find Jobs
Hire Freelancers

Linux shell script that updates one value in MYSQL table and schedule with crontab

$10-30 USD

In Progress
Posted almost 10 years ago

$10-30 USD

Paid on delivery
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. ----EXAMPLE--- 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; mysql(UPDATE...); } WHAT TO DELIVER? ----------------- 1. provide shell script for review 2. provide written tutorial how to install it on linux server 3. login into my server via ssh and install the script (shell and crontab)and make it run
Project ID: 5945863

About the project

1 proposal
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of GERMANY
Zürich, Germany
5.0
6
Payment method verified
Member since Nov 9, 2010

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.