Cron Jobs

Dear bloggie…?
(You may have seen me using this before…?)

I was asked by a client to send them a daily email (more like spam? :p) and thought cron job would be easiest?
I was planning on using

0 12 * * */home/username/public_html/filename.php

to run the cron job, but ended up with this error

/usr/local/cpanel/bin/jailshell: /home/username/public_html/filename.php: Permission
denied

I read somewhere that i needed to type my username in, so that became attempt 2…?

0 12 * * * username /home/username/public_html/filename.php

And because this post hasn’t finished yet, you guessed it, another error…

/usr/local/cpanel/bin/jailshell: username: command not found

So, back to the drawing board, how do we get the script to run from jailshell?
Let’s try a different approach? Since the script runs using the mail() function, we just need to call the page?

So, our last attempt…

0 12 * * * /usr/bin/wget http://www.client.tld/filename.php

And to test it?

–2013-12-11 10:36:01–  http://www.client.tld/filename.php
Resolving www.client.tld127.0.0.1
Connecting to www.client.tld|127.0.01|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 270
Saving to: “filename.php”

0K                                                       100% 34.7M=0s

2013-12-11 10:36:03 (34.7 MB/s) – “filename.php” saved [270/270]

As for a normal cron job, i’ll still need to look how to work around jailshell… :S

How to Redeem an iOS App (via iOS Device)

Okays, i’ve been giving away free apps codes for iOS via the Apple store and most people claim the link i sent them requires them to pay for the app? (I guess they missed the redeem code? :S)

Anyways, let’s redeem an app via an iPhone?
(Will do one for iTunes later…)

2013-11-20 20.44.48Launch the App Store!

2013-11-20 20.45.05You could be on the Top Charts, Genius, Search or Updates tab, but let’s tap on the Featured tab?

2013-11-20 20.45.11Welcome to the Feature tab! 😀

2013-11-20 20.45.17Let’s scroll down to Redeem?