Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 455649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:23:31+00:00 2026-05-12T22:23:31+00:00

I have a script that’s scheduled to run periodically on a customers production server

  • 0

I have a script that’s scheduled to run periodically on a customers production server to import some data from their FTP server. This needs to run as scheduled, even during the day when the customer is working. Occasionally, the script takes up large amounts of CPU which slows down the customers production environment. I thought I could use cpulimit to control the process, but I can’t seem to get it to run properly from within PHP. I have a sandbox script with the following lines:

$pid = getmypid();
exec("/usr/bin/cpulimit -p $pid -l 20 -z < /dev/null 2>&1 > /dev/null &");

When I get the pid and run this exact command from the command line it works great. However, when I run the script I get [1]+ Stopped php web/sandbox/sandbox.php. I have run background tasks from PHP scripts exactly like this many times. What could I be doing wrong?

Thanks in advance,
~ JamesArmes

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:23:32+00:00Added an answer on May 12, 2026 at 10:23 pm

    What does cpulimit do? It’s not a command in any Fedora installation at hand….

    It looks like it suspends the process when it accumulates too much CPU time; how about using nice instead?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that will run on server daily to download data from
I have a script that will fetch data from server and compose a DIV
I have this script that will let the user download the data from the
I have a script that pulls in meta data from a list of URL's
I have a script that retrieves objects from a remote server through an Ajax
I have a script that pulls data from a database, and based on the
I have a script that connects to SQL Server 2005 default instance. But I'm
I have a script that generates images from text using PHP. It's working fine
I have a script that imports a models.py from an app, but it will
I have a script that works fine when I run it manually in R

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.