Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Unsubscribed User](https://secure.gravatar.com/avatar/5fa5d7c80d8657982e63b283b59a3e4f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Unsubscribed User
Courses Plus Student 114 PointsRun a .js file from a php script (not on the browser)
I am trying to run a .js file that is located on my web-page. I am using a cron-job, which triggers a php script, every hour. I do also have a javascript that checks for new posts on a forum. If there are any new post, it sends notifications to my iPhone app. The problem is that I can't trigger the .js file. Any suggestions?
2 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsI still think you need to talk to the folks at cron-job.com. If they don't offer JavaScript on their server, what you want might not be possible. On the other hand, if they do, they should be able to give you instructions on how to use it.
But I have to wonder - why don't you run your JavaScript where your own web page is hosted?
![Unsubscribed User](https://secure.gravatar.com/avatar/5fa5d7c80d8657982e63b283b59a3e4f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Unsubscribed User
Courses Plus Student 114 PointsYes, but I am able to run a php-script, so I was wondering if it is possible to run javascript from the php-script (the php is located on my web-page)
Unsubscribed User
Courses Plus Student 114 PointsUnsubscribed User
Courses Plus Student 114 PointsWould it be possible to run the javascript file from the php if it was a nodejs?
Steven Parker
230,688 PointsSteven Parker
230,688 PointsBut do they have node.js installed on cron-job? What you run from their service must exist on their server.