I'm fucked.. :(

off-topic

#21

Yes it is possible!
Cron Jobs can be run on the nth day in every month.

I don’t have the format handy but it should be just a google search away.


#22

Okay… I will try to find… :slight_smile:


#23

Update: Just a advice, when you’re dealing with a script which takes hours to complete…
Try to use php-cli instead of normal web calls. In that apache won’t interfere & php script gonna run as a daemon…

Example:

nohup php example.php &

nohup stands for no hang up. which means script gonna continue to process even if you close or exit the session… You might wanna note down PID incase you have to kill the process.


#24

Update: Previously I wasn’t gonna keeping logs what my script doing since I wanted to make the script as much lightweight as possible.

But yesterday night, I removed all the output command, and added a logwriter… Meaning script now gonna log everything it’s doing… It’s gonna be very useful for debugging any troubles…

Another, thing is I was doing web based called via crontab using this 2 command.

set_time_limit(0); //no time limit.
ignore_user_abort(1); //keep process in background

But, now I’m doing PHP-CLI based crontab because I believe in web based, apache was freaking out sometimes and messing with my script.

But I gotta admit, watching your own developed bot doing it’s job peacefully is one of the greatest feeling for a developer… ( ͡o ͜ʖ ͡o) Here is snapshot what my logs look like…

Since, the log.txt is big, so I’m using tail command in php, to retrieving last 50 lines from the log file…