Skip to main content

Cross Domain Cron Jobs Not Working

Comments

8 comments

  • PostAlmostAnything
    I checked the cron log and it looks like the jobs are running but without the tail end of them. The second " and >/dev/null 2>$1 are not in the cron log when they are run. Here is an example with the exact destination edited out: Mar 31 00:00:01 93-95-228-111 CROND[16526]: (brokenborder) CMD (wget -q -O - "/dev/null 2>&1 It appears that having %3E appear after post-thumbnail is enough to cut off the rest of the job. That is an encoded > symbol that needs to be included so that it can be passed to a queryselector with a css class and an instruction to get the anchor element inside of it.
    0
  • PostAlmostAnything
    It seems even the jobs without that character that do run to the right place are not triggering the script on the other end. Are cron jobs compatible with javascript? All the URLs in question are javascript apps built with Node.js
    0
  • cPRex Jurassic Moderator
    Hey there! This seems more like a wget or BASH issue than a cron problem itself, since cron is just doing what it is told. I did find this guide about escaping special characters with wget:
    0
  • cPRex Jurassic Moderator
    Can you let me know what you mean when you say "not triggering the script on the other end"? Cron itself has no concept of javascript or bash or anything, as it just triggers the processes to happen at a certain time.
    0
  • PostAlmostAnything
    Can you let me know what you mean when you say "not triggering the script on the other end"? Cron itself has no concept of javascript or bash or anything, as it just triggers the processes to happen at a certain time.

    I mean that the script on the other end is not running when the cron job runs. The URLs given to the cron job are the same URLs that work fine when loaded in a browser and they work just fine when using wget manually via SSH, but when I use a cron job they do not run. I know they do not run because they are always supposed to update XML files on the other server when they run and the files remain unmodified no matter how many cron jobs are run.
    0
  • cPRex Jurassic Moderator
    Did you try the special character escape trick to see if that changed the behavior?
    0
  • PostAlmostAnything
    Did you try the special character escape trick to see if that changed the behavior?

    Sorry for not updating this. I tried simply using a + character and coding my script to convert + characters to > characters for the purpose of queryselector. Now they work. I also added an inbound rule granting access to the IP address of the server running the cron jobs. Now they work
    0
  • cPRex Jurassic Moderator
    Awesome - I'm glad things are working well now!
    0

Please sign in to leave a comment.