/    Sign up×
Community /Pin to ProfileBookmark

is there a command in php to make it pause for 8 hours then call function? Like the setTimeout() in javascript?

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@Jarrod1937Jul 17.2010 — Php has a sleep() function, but 8 hours is too long for a script to run. I'd recommend using something like a cron job (or a scheduled task for windows) to call the script.
Copy linkTweet thisAlerts:
@tirnaJul 17.2010 — sounds like you might want a cron job to execute your php script at set intervals.
Copy linkTweet thisAlerts:
@ZZYauthorJul 17.2010 — so i can set it to run the script even if my computer isnt the server for the web site?
Copy linkTweet thisAlerts:
@tirnaJul 17.2010 — provided you have access to create cron jobs on the web server, whether that server is your computer or not, you can set cron jobs to execute php scripts at virtually whatever time intervals you want.
×

Success!

Help @ZZY spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...