/    Sign up×
Community /Pin to ProfileBookmark

Automated Daily Function

I need to set up a system where a person will enter some information into a database, corresponding to a city and a date. Then I would need to set up a cron job that would go off once a day, pull up the date of all the cities and then email out that corresponding information. My original idea for a table was:

| id | city | date | information |
————————————————-

1 Chicago 11-01-10 some information
2 Chicago 11-02-10 more information
3 Seatle 11-01-10 information

So I figured that the cron job script would look up the date for that day, then execute emails with the information corresponding to that date.

Is this a good method or is there something more practical?

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Ntrimgs 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.7,
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,
)...