PHP file_put_contents at specified time I have a php file that points to a url like so:  &lt;?php header('Content-Type: text/plain'); echo file_get_contents($_GET['url']);   The thing I would like my php file to do in addition to pointing to the URL is write a file to the server at a specific time each day -- let's say 6:00pm (18:00).  From my initial research, the write file part seems straight forward  file_put_contents('todaysDateData.txt', $_GET['url']);   However, figuring out how to call file_put_contents each day at a specific time is throwing me for a loop.  Question: Is it possible to write a file in the manner described above at a specific time each day in native php? Ideally I would like to name the file with today's date and "Data" suffix (i.e. Mar-29-2018.txt).  Edit  Going from the suggestions below, I have researched cron: I think the syntax for my use case is:  0 18 * * * path/to/my/command.sh   I think the date syntax is correct, but I'm still confused as to how cron is used with my php file. Should I change the sh file extension to php since I'm using file_put_contents? Or is this cron date thing going in my php file itself and I have to make a .sh (whatever that is?)
PHP: running scheduled jobs (cron jobs) I have a site on my webhotel I would like to run some scheduled tasks on. What methods of achieving this would you recommend?  What I’ve thought out so far is having a script included in the top of every page and then let this script check whether it’s time to run this job or not.  This is just a quick example of what I was thinking about:  if ($alreadyDone == 0 &amp;&amp; time() &gt; $timeToRunMaintainance) {    runTask();    $timeToRunMaintainance = time() + $interval; }    Anything else I should take into consideration or is there a better method than this?
Story about astronauts who set off an alien warning beacon on the moon (or Mars?) Is it two-third or two-thirds? Is it two-third or two-thirds? If both are correct, how does their usage differ? This is a good news.    This is good news.    Which one is correct? Clarify the difference Prove that $\frac{ 5^{125}-1}{ 5^{25}-1}$ is a composite number Do I add quotes around my thoughts? He staggered in, late as usual, his hair this way and his collar the other. His socks were as mismatched as were his principles. I thought to myself, here comes yet another disastrous sales meeting.  It seems to me too much to write :     I thought to myself 'Here comes yet another disastrous sales meeting'.   The Authorised Version deliberately did away with punctuated speech, retaining only the capital to indicate the beginning of a quote but leaving out quotation marks.  Can I therefore do the same in common writing, for my thoughts ?     I thought to myself, Here comes yet another disastrous sales meeting.   I cannot find another question on EL&amp;U which covers this. Close/minimize/maximize button not appearing I was playing around with compizconfig. I don't remember what exactly I clicked. Since then, the close/minimize buttons and the sidebar vanished. I use 12.10 version. Please help me out. How to call drupal_bootstrap from custom file in subfolder? I'm trying to call drupal_bootstrap from 'temp.php' in a subfolder called 'custom' my code as follow:  chdir('../'); define('DRUPAL_ROOT', getcwd()); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);   Once I call the temp.php I get Drupal homepage.   I also tried an explicit physical path but with no use, code as follow:  define('DRUPAL_ROOT', '/var/htdocs/drupal7'); require_once '../includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);   temp.php located under the following folder structure:  - var -- htdocs --- drupal7 ---- custom  ----- temp.php Whats this white stuff on my board? Can anyone help me out with how to make Bing Picture to my Desktop Wallpaper?    So it works by downloading the highest quality of todays picture. Then storing it ex in the Picture folder of your account. After that automatically changing the picture itself.  It should continue the same everyday without hassle in the background.  Probably something I have to add in the Startup Applications. Any differences between Ubuntu versions?    -Do I have to write a script?  This would be appreciated by many others too! Thank You in Advance :) Why was the universe in an extraordinarily low-entropy state right after the big bang? Let me start by saying that I have no scientific background whatsoever. I am very interested in science though and I'm currently enjoying Brian Greene's The Fabric of the Cosmos. I'm at chapter 7 and so far I understand most of general ideas he has talked about. Or at least, I think I understand them :-)  There is however one part, at the end of chapter 6 that I can't grasp.  It is about entropy and the state of the universe a few minutes after the big bang.  On page 171 he says:     Our most refined theories of the origin of the universe -our most refined cosmological theories- tell us that by the time the universe was a couple of minutes old, it was filled with a nearly uniform hot gas composed of roughly 75 percent hydrogen, 23 percent helium, and small amounts of deuterium and lithium. The essential point is that this gas filling the universe had extraordinarily low entropy.   And on page 173-174:     We have now come to the place where the buck finally stops. The ultimate source of order, of low entropy, must be the big bang itself. In its earliest moments, rather than being filled with gargantuan containers of entropy such as black holes, as we would expect from probabilistic considerations, for some reason the nascent universe was filled with a hot,   uniform, gaseous mixture of hydrogen and helium. Although this configuration has high entropy when densities are so low that we can ignore gravity, the situation is otherwise when gravity can't be ignored; then, such a uniform gas has extremely low entropy. In comparison with black holes, the diffuse, nearly uniform gas was in an extraordinarily low-entropy state.   In the first part of the chapter Brian Greene explains the concept of entropy with tossing the 693 pages of War and Peace in the air.  At first, the pages are ordered. The specific order they are in make sense and are required to recognize the pages as a readable book called War and Peace. This is low entropy. It is very highly ordered and there is no chaos.  Now, when you throw the pages in the air, let them fall and then pick them up one by one and put them on top of each other, the chances you get the exact same order as the initial state are extremely small. The chance you get another order (no matter what order, just not the one from the beginning) is extremely big. When the pages are in the wrong order, there is high entropy and a high amount of chaos. The pages are not ordered and when they are not ordered you would not notice the difference between one unordered state and another one.  However, should you swap two pages in the ordered, low entropy version, you would notice the difference.  So I understand low entropy as a highly ordered state with low chaos in which a reordering of the elements would be noticeable.  I hope I'm still correct here :-)  Now, what I don't understand is how a uniform mixture of hydrogen and helium can by highly ordered? I'd say you wouldn't notice it if some particles traded places. I'd say that a uniform mixture is actually in a state of high entropy because you wouldn't notice it if you swapped some hydrogen atoms.  Brian Greene explains this would indeed be the case when gravity plays no important role, but that things change when gravity does play a role; and in the universe right after the big bang, gravity plays a big role.  Is that because a reordering of the particles would change the effects of gravity? Or is there something else that I'm missing here? I know that if (p) is maximal then Z/(p) is a field which implies its an integral domain which then implies that (p) is a prime ideal and p is prime. I'm having trouble going the forward direction assuming that p is prime and then showing it's a prime ideal. System of linear equations having a real solution has also a rational solution. Differences between "however", "although","albeit", etc Can I leave the Schengen Area (and come back) while my non-eea spouse resident card application is being processed? My wife and I recently moved to Germany. She's a Swedish citizen, and I'm American. It'll be December before I can actually apply for my residence card, because my appointment to register our address is so far out - the local police station was all booked out and we didn't get an apartment right away.  I imagine that I won't be getting my residence card until well after Christmas, by which time my 90/180 days will be passed. What if I want to leave to, say, London for the holidays? Will I be allowed back in? I hit day 90 around the 21st of December. I could maybe leave on day 89 and come back on day 90 (with my wife and our marriage cert), or use this Polish solution: , since I can't be expelled from Germany for overstaying my visa while my application is processing.  Both of those seem a bit risky though. Am I reading too far into it, or is this a legitimate concern? Will I get some sort of documentation saying I have a residence card application processing? How can I increment a date by one day in Java? I'm working with a date in this format: yyyy-mm-dd.  How can I increment this date by one day? Don't impose delay loading Close dialog when you haven't just loaded it Because of , clicking the "close" link on a question that's been edited (for me usually the edit comes in a half-second before, as I'm reaching for the link) reloads the question instead of opening the Close dialog. Clicking it again to actually open the close dialog says     You may only open the Close dialog every three seconds   I didn't open it, I refreshed the post.  And yes, there are lots of times when the post edit is so trivial it's obvious in less than a second that it doesn't affect the need to close the question. Can a mangaka continue another mangaka's manga? There are plenty of manga that never had an ending for many reasons. For example, High School of the Dead's mangaka, Daisuke Satou, . Some mangaka also cannot continue their work because of health problems, as well as other reasons. Say the original mangaka either prepared or did not prepare an ending himself/herself, can another mangaka continue their work? Has this ever happened before? Rendering an animation the way 3D view looks I have often heard it recommended that a user account should be disabled by setting its shell to /bin/false. But, on my existing Linux systems, I see that a great number of existing accounts (all of them service accounts) have a shell of /sbin/nologin instead.  I see from the man page that /sbin/nologin prints a message to the user saying the account is disabled, and then exits. Presumably /bin/false would not print anything.  I also see that /sbin/nologin is listed in /etc/shells, while /bin/false is not.  The man page says that FTP will disable access for users with a shell not listed in /etc/shells and implies that other programs may do the same. Does that mean that somebody could FTP in with an account that has /sbin/nologin as its shell?  What is the difference here? Which one of these should I use to disable a user account, and in what circumstances? What other effects does a listing in /etc/shells have? How Do I Reset A Manual Installation Of Windows Subsystem For Linux? Related:   When installing a WSL distribution outside of the Microsoft Store (for example on a restricted network, see linked), many of the standard means of interacting with that distribution are not available.  In my example, when I go through Settings > Apps and Features, the distro is not shown in the list and the management features are not available.  If I get my manually installed linux instance into a bad state, what is the correct way to reset it and bring it back to a fresh install?  Edit:  Examples of a 'bad state' encountered thus far include a BSOD during an 'apt-get update', leading to an unrecoverable state.  Also, performing multiple configuration changes to troubleshoot a problem, removing or disabling services and installing other packages without keeping close track of what was changed, with a desire to "start fresh" to test if the solution arrived at does in fact work on its own..